title: How to correctly cast to subclass in Swift?
body: <p>I have a <code>UITableView</code> with a lot of different cells, based on whats in the content array of the datasource they should show custom content. </p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          var cell : UITableViewCell? = nil
          let objectAtIndexPath: AnyObject = contentArray![indexPath.row]
  
          if let questionText = objectAtIndexPath as? String {
              cell = tableView.dequeueReusableCellWithIdentifier("questionCell", forIndexPath: indexPath) as QuestionTableViewCell
              cell.customLabel.text = "test"
          }
  
          return cell!
      }
  </code></pre>
  
  <p>Here I get the error that </p>
  
  <p><code>UITableViewCell does not have the attribute customLabel</code> </p>
  
  <p>which <code>QuestionTableViewCell</code> does have. Whats wrong with my cast to <code>QuestionTableViewCell</code>?</p>