title: UITableView custom cell disappears and appears randomly while scrolling
body: <p>Good Evening</p>
  
  <p>I have a UITableView with custom cells, which behaves weird and I can't find the solution. So my table points to the controller and uses it as dataSource. Here is the code to retrieve cells</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let tempCell = tableView.dequeueReusableCellWithIdentifier(armPointCellIdentifier, forIndexPath: indexPath) as! AircraftTableCell
  
      tempCell.hidden = false
      tempCell.UILabel_aircraftName.text = "CELL #\(indexPath.row) : \(tempCell)"
  
      print("\(indexPath.row): \(tempCell)")
  
      return tempCell;
  
  }
  </code></pre>
  
  <p>When I scroll, cells appear and disapper. I never get nils in the print-out. Here is before scrolling up and down:</p>
  
  <p><a href="https://i.stack.imgur.com/Ne9Kc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ne9Kc.png" alt="Before Scrolling"></a></p>
  
  <p>And here is after</p>
  
  <p><a href="https://i.stack.imgur.com/PDduq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PDduq.png" alt="After Scrolling"></a></p>
  
  <p>I tried googling, but nothing helps... </p>
  
  <p><strong>Update 1</strong></p>
  
  <p>So I tried debugging based in suggestion that the items get 0 height, or get moved under other items. But I actually have empty views for some cells. Here is sample debug output. You can see that one cell has switch and label, and the other doesn't. I hope somebody knows what to do :((</p>
  
  <p><a href="https://i.stack.imgur.com/VEgk4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VEgk4.png" alt="enter image description here"></a></p>