I'm trying to figure out how to populate an image viewer with an image stored on the camera roll of an iPhone. I was thinking of using the following code:
@IBOutlet weak var imageoutlet: UIImageView! //remove the weak
override func viewDidLoad() {
super.viewDidLoad()
imageoutlet.image = UIImage(named:"IMG_0031.JPG")
// Do any additional setup after loading the view, typically from a nib.
}
As a way to populate the image viewer object (called imageoutlet) with an image named "IMG_0031.JPG"). I tried doing it this way but unfortunately it did not work. If someone can give me advice on a good way to access and populate images stored on an iPhone's Camera roll, I will be very grateful. Thanks!