i am trying to implement the collection vie as described in this tutorial
it is crashing on the following line
let gelleryImageView: UIImageView = (cell.viewWithTag(100) as! UIImageView)
with
fatal error: unexpectedly found nil while unwrapping an Optional value
my imageView is the only child of the reusable cell and the imageView has the tag of 100
Rest of method
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath)
// Configure the cell
print(cell.subviews.count)
let gelleryImageView: UIImageView = (cell.viewWithTag(100) as! UIImageView)
gelleryImageView.image = images[indexPath.row]
return cell
}