title: iOS 5 UITableViewCell custom XIB's aka "Am I losing my mind?"
body: <p>Alright. I've done more custom UITableViewCells than I can possibly count over the last three years.</p>
  
  <p>Then comes iOS 5 and I just got a project on my desk where I have to do yet some more.</p>
  
  <p>So the way I used to do this is I would make a custom XIB, drag a UITableViewCell onto the canvas, plug my controls in, set the custom class, do my linkage... then load instantiate the cell in code by looping through the objects after unpacking the XIB.</p>
  
  <p>Did it so many times I had a single Category function to handle the whole thing.</p>
  
  <p>Now all of a sudden in iOS 5 it's serving up big blank white table cells every time I make a custom cell.</p>
  
  <p>Here are the following characteristics of the custom cells being inserted into the table</p>
  
  <p>1) Show completely stark white apart from the "default" UITableViewCell controls (textLabel, etc, will populate and show when I set text to them).</p>
  
  <p>2) isKindOfClass(MyCustomCellClass) reports true</p>
  
  <p>3) Setter methods on custom cell class are functioning, object pointers for set values AND custom UILabels and such all report as non-nil, meaning the cell is actually getting made and properly being instantiated from the XIB</p>
  
  <p>4) Will show offbeat controls like a UIStepper unconditionally for some reason. So yes, if I place a stepper in my custom cell, it shows, but labels and images don't.</p>
  
  <p>As best I can figure, something is obscuring the content view by default, or otherwise the custom controls I am creating are no longer being appropriated to the contentView of the cell anymore (like they used to be), and are instead just being tossed into outer space.</p>
  
  <p>For example, in iOS 4 XIB's, I used to see this when crafting a custom cell (Pulled from Apple's iOS 5 documentation):</p>
  
  <p><img src="https://i.stack.imgur.com/rJHJJ.png" alt="Pulled from Apple&#39;s iOS 5 documentation"></p>
  
  <p>But as of this moment, this is what I see when doing the same in an iOS 5 XIB</p>
  
  <p><img src="https://i.stack.imgur.com/iv1Ke.png" alt="enter image description here"></p>
  
  <p>So note that it's not explicitly showing that little Content View dotted line anymore.</p>
  
  <p>I've really exhausted all of my diagnostic knowhow on this problem. I've tried manually pumping all the custom labels directly into the content view at runtime but even that doesn't work.</p>
  
  <p>I'm looking for any ideas at all.</p>
  
  <p><em>edit</em></p>
  
  <p>Code for loading XIB</p>
  
  <pre><code>if (cell == nil)
  {
      [[NSBundle mainBundle] loadNibNamed:@"XCCodeViewCell" owner:self options:nil];
      cell = codeCell;
      self.codeCell = nil;
  }
  </code></pre>
  
  <p>This is currently what it is after simplifying it based on Apple's newer iOS 5 recommendations. The XIB has its owner properly set to the class of "self", and codeCell is linked to the cell properly, with the right class and identifier.</p>