title: Can't access labels in a custom cell
body: <p>I have a ViewController and a TableViewController on the storyboard.
  The TableViewController has a custom cell with a label on it. Custom cell has its own class CompanyTableViewCell.swift:</p>
  
  <pre><code>import UIKit
  class CompanyTableViewCell: UITableViewCell {
  
      @IBOutlet var companyName : UILabel
  
      init(style: UITableViewCellStyle, reuseIdentifier: String) {
          super.init(style: style, reuseIdentifier: reuseIdentifier)
          println("Cell's initialised")
      }
  
      ... // other default cell methods
  }
  </code></pre>
  
  <p>In my TableViewController I have methods:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      self.tableView.registerClass(CompanyTableViewCell.self, forCellReuseIdentifier: "CompanyCell")     
      println("Cell's registered")
  }
  
  override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -&gt; UITableViewCell? {
      let cell = tableView.dequeueReusableCellWithIdentifier("CompanyCell") as CompanyTableViewCell        
      println(cell.companyName)
      cell.companyName.text = "Company name"    
      return cell
  }
  </code></pre>
  
  <p>When I run the code, <strong>if the TableViewController is marked as initial view controller</strong> it runs ok and the text of the label on my custom cell is being changed successfully. I can see bunch of cells with <code>Company name</code>.</p>
  
  <p>But when I assign initial view controller property to the ViewController, and trying to access the TableViewController from it as (the ViewController has a button which runs searchByName action):</p>
  
  <pre><code>// ViewController.swift
  @IBAction func searchByName(sender : UIButton) {
      var vc = SearchTableViewController(style: UITableViewStyle.Plain) 
      vc.companies = self.companies
      self.showViewController(vc, sender: self)
  }
  </code></pre>
  
  <p>I've got app crush on <code>cell.companyName.text = "Company name"</code> string with error: <strong>fatal error: Can't unwrap Optional.None</strong>. On the previous string <code>println(cell.companyName)</code> prints nil to console, although in console I see that cell class was registered and cell object was initialised. </p>
  
  <p>The question is how to assign text to the label, what I've forgotten? And why it works in the first case but not in the second. Thanks.</p>