I am populating an array with core data. So I take a picture, it saves, and should return my image in a uiview, but instead getting this error:
fatal error: unexpectedly found nil while unwrapping an Optional value
I took the pic before I went into the view controller to view, it, but right when i did, it gave me this error.
var stores = [Image]()
var cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as UICollectionViewCell
let store = stores[indexPath.row]
var imageView = cell.viewWithTag(1) as UIImageView
imageView.image = UIImage(data: store.image as NSData)
This code is suppossed to unwrap the collection cell with a tag of 1.