title: Swift Custom UITableViewCell with programmatically created UITableView
body: <p>I'm trying to use a custom TableViewCell Class in my programmatically created UITableView and i can't figure out why this don't get to work. I've used custom TableViewCell Classes a few times without any problems (set the Classname in Storyboard) but here i have no Storyboard to set the Class which should be used to generate the Cells.</p>
  
  <p>I'm doing this:</p>
  
  <pre><code>override func viewDidLoad() {
      ...
      self.popupTableView.registerClass(CustomTableViewCellPopup.self, forCellReuseIdentifier: "popupTableViewCell")
      ...
  }
  
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      var cell = tableView.dequeueReusableCellWithIdentifier("popupTableViewCell") as CustomTableViewCellPopup
      ...
      return cell
  }
  
  class CustomTableViewCellPopup: UITableViewCell {
  
      var message: UILabel = UILabel()
  
      override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
          super.init(style: style, reuseIdentifier: reuseIdentifier)
      }
  
      required init(coder decoder: NSCoder) {
          super.init(coder: decoder)
      }
  
      override func awakeFromNib() {
          super.awakeFromNib()
  
          println("I'm running!")
          self.message.frame = CGRectMake(0, 0, 10, 10);
          self.message.backgroundColor = UIColor.brownColor()
          self.addSubview(self.message)
      }
  
  }
  </code></pre>
  
  <p>The println() Output never appears. The TableView gets rendered without the additional UILabel (message). Just like an out of the box UITableViewCell.</p>
  
  <p>The same way (without registerClass()) i'm running a TableView with custom Cells from the Storyboard (the Classname directly defined in the Storyboard Inspector) without any problems.</p>
  
  <p>Have you an idea why the custom Class don't get used?</p>