Im a newbie in swift. I'm trying to pass my image to UIImageView on another view controller but error message "Cannot assign value of type 'UIImage' to type 'UIImageView' came out. Does anyone know how to fix this?
what are you doing:
let image: UIImage = UIImage() // <- its create image
let imageView: UIImageView = UIImageView() // its create some kind of container
imageView = image // ERROR!
you trying to set object with type UIImage to object with type UIImageView
correct:
let image: UIImage = UIImage()
let imageView: UIImageView = UIImageView()
imageView.image = image