title: Multiple custom cell types per table UITableView (iPhone)
body: <p>I've been searching everywhere on Apple.Developer and Stackflow and haven't come to a clear, standard and proper way of handling this. Basically what I'm looking to do is how to represent more than one customized cell type in a table.  Also, there are other tables in the app that will potentially reuse some customized cells.</p>
  
  <p>Most of the time, tables will have the same cell type repeated over and over.  But in a few cases, I have a table with a couple types of complex custom cells.</p>
  
  <p>Listed below are the different ways I've learned you can do this.  I've tried each one and they all work but I'm unsure of the "proper" way and a way that Apple won't reject.</p>
  
  <p>1) <strong>programatically</strong> - ultimately, this is the best choice for performance. But if there's a way that I can draw complex customized cells in Interface Builder, it would be the better choice. This is what I'm trying to avoid.</p>
  
  <p>2) <strong>a customized cell class with a separate XIB</strong> - each customized cell has its own header/implementation/XIB and is a subclass of UITableViewCell.  A single cell in a XIB has its file owner set to a specific UITableViewController class. The View here has also been removed. </p>
  
  <p>3) <strong>a customized cell in the same XIB as the view controller's XIB</strong> - I read that this is bad. A controller should only be associated with a single view in the hierarchy. I included a customized cell in the XIB at the same level as the view and then just linked it up to the controller's IBOutlet. </p>
  
  <p>4) <strong>a separate common XIB</strong> - this is essentially a <em>dumping ground for customized cells</em>. The view here has also been removed.  The XIB contains multiple cells and each cell is associated with a specific subclass of UITableViewCell.  A header and implementation file contain the definition and implementation for each cell that is subclassed from UITableViewCell.  In the controller that is showing the table, the method cellForRowAtIndexPath, loops through the NSBundle for this common XIB and finds the cell associated with a specific subclass type of UITableViewCell. Then it returns that.  This works beautifully for reuse throughout the app but something is telling me it's bad.</p>
  
  <p>What would be the proper way for different cell types in a single table?</p>