TNImageSliderViewController
TNImageSliderViewController copied to clipboard
fatal error: unexpectedly found nil while unwrapping an Optional value
Error in this line:
// 1. Set the image array with UIImage objects
imageSliderVC.images = [image1, image2, image3]
There is my po Log
(lldb) po image1
<UIImage: 0x7fe643d1f2c0>, {320, 152}
(lldb) po image2
<UIImage: 0x7fe643d21590>, {320, 152}
(lldb) po image3
<UIImage: 0x7fe643d21e10>, {320, 152}
I have the same problem
Any solution to this? I'm having the same issue!
Are you sure the view controller has already been loaded?
When the image property is set, the collectionview's reloadData method is called. It could be that the collectionview hasn't been created yet.
Only set the images property, after the viewDidLoad has been called (at that point all UI elements have been created).