I\'ve a simple model that includes:
var photos: [UIImage]?
I\'ve copied the file zombies.jpg as a file into the project. Then, in a required in
You have initialize photos array, and you are using conditional unwrapping, which means if its not nil append but your photos array is nil at the time so it will not append a photo in nil array. You should do something like this var photos:[UIImage] = []
Better do this:
var photos : [UIImage?] = []
It initializes an empty array, that is ready to store UIImage
objects.