title: Custom UITableViewCell not working (drawRect:) on device [Swift]
body: <p>I made a simple project where I subclass a <code>UITableViewCell</code> to the test <code>drawrect:</code> method. In <code>cellForRowAtIndexPath</code> I set the background of every other cell <code>backgroundColor</code>. It works on simulator but not on device.
  I know that there are easier methods to get alternating cell backgrounds, but this is just an easy example to show that drawRect doesn't seem to work on my device in this case.</p>
  <p>Here is my code:</p>
  <pre><code>// The subclassed custom cell
  
  class CustomCell: UITableViewCell {
         var fColor: UIColor?
  
      override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
          super.init(style: style, reuseIdentifier: reuseIdentifier)
          fColor = UIColor.clearColor()
      }
      
      required init(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          fColor = UIColor.clearColor()
      }
   /*   
      func setFcolor(c:UIColor){
          fColor = c
          setNeedsDisplay()
      }
    */
  
      override func drawRect(rect: CGRect) {
          var context: CGContextRef = UIGraphicsGetCurrentContext()
          var color: UIColor = fColor!
          color.set()
          CGContextFillRect(context, rect)
          
      }
  }
  
  
  // My cell creation
  
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      let cell: CustomCell = tableView.dequeueReusableCellWithIdentifier(&quot;CustomCell&quot;) as CustomCell
              
      cell.fColor = indexPath.row % 2 == 0 ? UIColor.whiteColor() : UIColor.blackColor()
      cell.textLabel.text=&quot;row#\(indexPath.row)&quot;
     
      return cell
  }
  </code></pre>
  <p>Here is the setup in the storyboard:</p>
  <p><img src="https://i.stack.imgur.com/rePlP.png" alt="customcell" /></p>
  <p><img src="https://i.stack.imgur.com/Z0RcD.png" alt="customcell2" /></p>
  <p>And here is the expected outcome on the simulator:</p>
  <p><img src="https://i.stack.imgur.com/7EvLZ.png" alt="simulator" /></p>
  <p>But on my device (iOS7.1) every cell background is white</p>