title: Custom TableView cell dequeue fatal error: unexpectedly found nil
body: <h1>The setup</h1>
  
  <p>I'm trying to customise a prototype cell. Here's the cell in my main storyboard.</p>
  
  <p><img src="https://i.stack.imgur.com/BVDEa.png" alt="enter image description here"></p>
  
  <p>I have a custom cell class.</p>
  
  <pre><code>class UserListTableViewCell: UITableViewCell {
      @IBOutlet weak var nameLabel: UILabel!
      @IBOutlet weak var dateCreatedLabel: UILabel!
      @IBOutlet weak var dateOfLastLoginLabel: UILabel!
  }
  </code></pre>
  
  <p>It is linked up with the prototype cell in the same storyboard.</p>
  
  <p><img src="https://i.stack.imgur.com/nESzd.png" alt="enter image description here"></p>
  
  <p>And just to be sure, here's the custom class name in the inspector.</p>
  
  <p><img src="https://i.stack.imgur.com/tMVNP.png" alt="enter image description here"></p>
  
  <p>Finally, in my view controller, I have the following extension that implements the <code>UITableViewDataSource</code> protocol.</p>
  
  <pre><code>extension UserListViewController: UITableViewDataSource {
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return users.count
      }
  
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("userListCell", forIndexPath: indexPath) as! UserListTableViewCell
          cell.nameLabel.text = users[indexPath.row].name
          return cell
      }
  }
  </code></pre>
  
  <p>Along with the <code>viewDidLoad</code> method.</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      tableView.dataSource = self
      tableView.tableHeaderView = tableHeaderView
      tableView.registerClass(UserListTableViewCell.self, forCellReuseIdentifier: "userListCell")
  }
  </code></pre>
  
  <h1>The problem</h1>
  
  <p>When I launch this in the simulator I get a runtime crash with <code>fatal error: unexpectedly found nil while unwrapping an Optional value</code>. In the stack trace all of my labels are <code>nil</code>.</p>
  
  <p>What's going on here and how can I fix this?</p>