Dave1201 Dave1201 - 1 year ago 45
iOS Question

Set an UIImage to an Imageview Swift

Just started coding and i am running in to the following problem:

I have set up the following struct:

Connected the UIImageView as: @IBOutlet var Qimage: UIImageView!

I tried to fill the struct, and all the data is displayed correctly except the image? Example:

At last i am trying to fill the struct with a function and used: Qimage.image = Questions[Qnumber].Image

Thanks in advance for the help!


Use: UIImage(named: "Test").. instead of UIImage(contentsOfFile: "Test")