title: UITableView with custom cells draws fine on iOS 6 but completely white in iOS 7
body: <p>I am building an app on Xcode 5 that targets iOS 6+.</p>
  
  <p>I'm having trouble building up my table view with custom cells. Interestingly, it was working great until I updated to Xcode 5.0.2 today (I have no idea what changed). My table view did draw plain white (screenshot below) before too when I messed with the white navigation bar style (I have no idea how they also link to each other either) that came with iOS 7 SDK. Anyway, when I removed the light status bar option from my code, my table view used to draw normally, though I have black status bar. Today, after installing Xcode 5.0.2, I've built the same project without changing any code, and my table view now draws plain white on iOS 7 (both device and simulator). When I switch to iOS 6, it displays perfectly (both device and simulator). I've tried cleaning the build folder, cleaning the derived data folder, restarting Xcode/simulator/device, but nothing has changed. Also, the app started to display white status bar which didn't before updating Xcode. I know that they should be irrelevant but I'm having hard time developing my app now. The cells receive all the touch events, the table view does scroll, I'm getting all the <code>NSLog</code>s at the output and I can see the scroll bar when I scroll down. It just doesn't draw. I had custom <code>drawRect:</code> code in my custom cells. After seeing <a href="https://stackoverflow.com/questions/18884327/uitableviewcell-custom-cg-drawing-ios-7">UITableViewCell custom CG drawing iOS 7</a> and <a href="https://stackoverflow.com/questions/3527925/subclassed-uitableviewcell-backgroundview-covers-up-anything-i-do-in-drawrect">subclassed UITableViewCell - backgroundView covers up anything I do in drawRect</a> I commented out that code, but it didn't help. Here is what I'm getting on iOS 7 (selected cell in gray):</p>
  
  <p><img src="https://i.stack.imgur.com/9t9MQ.png" alt="enter image description here"></p>
  
  <p>And here is the same app on iOS 6 (blurred text/images for privacy):</p>
  
  <p><img src="https://i.stack.imgur.com/VwQAo.png" alt="enter image description here"></p>
  
  <p>Here is the code for <code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</code>:</p>
  
  <pre><code>MyFriendViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"friendTableCell"];
      if(!cell){
          cell = [[[NSBundle mainBundle] loadNibNamed:@"MyFriendViewCell" owner:self options:nil] lastObject];
      }
      /* some code that sets text fields/images */
      [...]
      return cell;
  </code></pre>
  
  <p>I have a XIB file (with only one object, my custom cell class) and a class corresponding to the cell. I've registered my cell in the beginning:</p>
  
  <pre><code>[self.tableView registerNib:[UINib nibWithNibName:@"MyFriendViewCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"friendTableCell"];
  </code></pre>
  
  <p>I've checked the <code>cell</code> in the method, dequeue never returns <code>nil</code> anyway.</p>
  
  <p><strong>UPDATE:</strong> I've also realized that my app uses 100% CPU when idle on this screen on both iOS 6 (even though it runs correctly) and on iOS 7).</p>
  
  <p><strong>IMPORTANT:</strong> The question has been answered, but to any of you who were wondering about <code>drawRect:</code>, the problem had nothing to do with that, I'm still using custom <code>drawRect:</code> and it works perfectly.</p>