title: Access different views inside of a UITableViewCell by tag in Swift
body: <p>I'm trying to make an app for iOS 8, using swift. The goal here is to make a kind of news feed. This feed displays posts from users, which follows a certain pattern.</p>
  
  <p>I thought of using the UITableView where each cell follows a custom layout. The problem appears when I try to access a text label inside it. I try to access it by its tag, but when I do it, the whole app crashes. The error reported is <code>"Swift dynamic cast failed"</code>, and I'm using the following code to access the view:</p>
  
  <pre><code>override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -&gt; UITableViewCell! {
  
      let cellId: String = "cell"
  
      var cell : UITableViewCell = tableView.dequeueReusableCellWithIdentifier(cellId) as UITableViewCell
  
      if let ip = indexPath{
          cell.textLabel.text = myData[ip.row] as String
          var lbl = cell.contentView.viewWithTag(0) as UILabel
          lbl.text = "ola"
      }
  
      return cell
  }
  </code></pre>
  
  <p>Am I doing something wrong? Thanks in advance!</p>