title: unexpectedly found nil UIImageView
body: <p>I have a <code>UICollectionViewController</code> :</p>
  
  <pre><code>import UIKit
  
  private let reuseIdentifier = "Cell"
  
  class PhotosCollectionViewController: UICollectionViewController {
  
      let photos = [
          UIImage(named: "photos_1"),
          UIImage(named: "photos_2"),
          UIImage(named: "photos_3"),
          UIImage(named: "photos_4"),
          UIImage(named: "photos_5"),
          UIImage(named: "photos_6"),
          UIImage(named: "photos_7"),
          UIImage(named: "photos_8"),
          UIImage(named: "photos_9"),
          UIImage(named: "photos_10"),
          UIImage(named: "photos_11"),
          UIImage(named: "photos_12"),
          UIImage(named: "photos_13"),
          UIImage(named: "photos_14"),
          UIImage(named: "photos_15"),
          UIImage(named: "photos_16"),
          UIImage(named: "photos_17"),
          UIImage(named: "photos_18")
      ]
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          // Uncomment the following line to preserve selection between presentations
          // self.clearsSelectionOnViewWillAppear = false
  
          // Register cell classes
          self.collectionView!.registerClass(PhotoCollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier)
  
          // Do any additional setup after loading the view.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      /*
      // MARK: - Navigation
  
      // In a storyboard-based application, you will often want to do a little preparation before navigation
      override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
          // Get the new view controller using [segue destinationViewController].
          // Pass the selected object to the new view controller.
      }
      */
  
      // MARK: UICollectionViewDataSource
  
      override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -&gt; Int {
          // #warning Incomplete implementation, return the number of sections
          return 1
      }
  
  
      override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          // #warning Incomplete implementation, return the number of items
          return photos.count
      }
  
      override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
          let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! PhotoCollectionViewCell
  
          cell.imageView.image = self.photos[indexPath.row]
          // cell.backgroundColor = UIColor.blueColor()
  
          return cell
      }
  
      // MARK: UICollectionViewDelegate
  
      /*
      // Uncomment this method to specify if the specified item should be highlighted during tracking
      override func collectionView(collectionView: UICollectionView, shouldHighlightItemAtIndexPath indexPath: NSIndexPath) -&gt; Bool {
          return true
      }
      */
  
      /*
      // Uncomment this method to specify if the specified item should be selected
      override func collectionView(collectionView: UICollectionView, shouldSelectItemAtIndexPath indexPath: NSIndexPath) -&gt; Bool {
          return true
      }
      */
  
      /*
      // Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
      override func collectionView(collectionView: UICollectionView, shouldShowMenuForItemAtIndexPath indexPath: NSIndexPath) -&gt; Bool {
          return false
      }
  
      override func collectionView(collectionView: UICollectionView, canPerformAction action: Selector, forItemAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) -&gt; Bool {
          return false
      }
  
      override func collectionView(collectionView: UICollectionView, performAction action: Selector, forItemAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) {
  
      }
      */
  
  }
  </code></pre>
  
  <p>And the cell VC:</p>
  
  <pre><code>import UIKit
  
  class PhotoCollectionViewCell: UICollectionViewCell {
  
      @IBOutlet var imageView: UIImageView!
  }
  </code></pre>
  
  <p>And in my assets I've got all the images listed it photos array -> <a href="http://prntscr.com/9tb7go" rel="nofollow">http://prntscr.com/9tb7go</a></p>
  
  <p>At this line, I get an error:</p>
  
  <pre><code>cell.imageView.image = self.photos[indexPath.row]
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>fatal error: unexpectedly found nil while unwrapping an Optional value
  (lldb) 
  </code></pre>