I am using latest stable Swift inside my function i get fatal error.when i ran my ios app.
"fatal error: unexpectedly found nil while unwrapping an Optional value".
I searched for answer, but they offer different methods for unwrapping it.
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
var cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath) as! UICollectionViewCell
var imageView = cell.viewWithTag(1) as! UIImageView
imageView.image = UIImage(named: imagesArray[indexPath.row])
}