title: Swift Cocoa Touch custom cell returning nil for IBOutlets
body: <p>I'm writing an app in which I have a horizontal collection view within a table view cell.</p>
  
  <p>When trying to set the text in the cell programmatically, the app crashes with the <code>fatal error: unexpectedly found nil while unwrapping an Optional value</code> error message.</p>
  
  <p>To me, and to a much more experienced cocoa-touch programmer, this suggested that my IBOutlets were not connected correctly, and so <code>cell.filmTitle</code> would return nil when explicitly unwrapped.  So I unconnected all my IBOutlets to the cell XIB, and removed all the code behind them, before recoding the IBOutlets and reconnecting them.  But the error was still there.</p>
  
  <p>The code for the custom cell is:</p>
  
  <pre><code>class homeWhatsOnCellectionCell: UICollectionViewCell {
      @IBOutlet var filmTitle: UILabel!
      @IBOutlet var filmPoster: UIImageView!
  }
  </code></pre>
  
  <p>And the code for the collection view datasource is:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView!, numberOfItemsInSection section: Int) -&gt; Int {
      return 1
  }
  
  func collectionView(collectionView: UICollectionView!, cellForItemAtIndexPath indexPath: NSIndexPath!) -&gt; UICollectionViewCell! {
      var cell: homeWhatsOnCellectionCell = collectionView.dequeueReusableCellWithReuseIdentifier("Home Whats On Collection View Cell", forIndexPath: indexPath) as homeWhatsOnCellectionCell
      cell.filmTitle.text = "The Hunger Games: Catching Fire"
      cell.filmPoster.image = UIImage(named: "The Hunger Games.jpg")
      return cell
  }
  
  func numberOfSectionsInCollectionView(collectionView: UICollectionView!) -&gt; Int {
      return 1
  }
  </code></pre>
  
  <p><strong>Edit:</strong> From a conversation with Nate Cook, I can say that <code>filmTitle</code> is the cause of the problem, with it being <code>nil</code> despite being connected properly to a label.  Also, <code>dump(cell)</code> outputted "-" to the console.  Thanks to anybody who can help.</p>
  
  <p><strong>Edit 2:</strong> Through further investigation, I have found that the cell is not being seen at all.  When I removed the IBOutlets, and tried to simply show 10 cells as they appear in the XIB, they don't show up at all, and all I get is ten blank cells of the same size.  It is showing some cells, as the scrollbar changes size and scrolls based on how many cells are being displayed.</p>