title: How to make a UITableViewCell with different subviews reusable?
body: <p>I have a <code>UITableView</code> in which I display, naturally, <code>UITableViewCells</code> which are all of the same class, let's call it <code>MyCell</code>. So I have one <code>MyCell.xib</code>, one <code>MyCell.h</code> and one <code>MyCell.m</code>.</p>
  
  <p>Unfortunately, this cells do contain one subview, which holds varying content, e.g. a <code>train subview</code> and a <code>car subview</code>.  So if the <code>UITableView</code> is in need of a new cell, it's always a <code>MyCell</code> but sometimes it contains a train subview and sometimes a car subview.</p>
  
  <p>Now, here is my problem: How to make <code>MyCell</code> properly reusable? The cell itself is reusable as intended (In the .xib I defined it's identifier) but it's subview has to be created again and again for every cell. My first idea was to change the identifier of <code>MyCell</code> depending on it's content but unfortunately, reuseIdentifier can't be changed on runtime.
  I could, however, implement my own <code>- (NSString *) reuseIdentifier {}</code> which I guess would work, though I wouldn't consider it great style. Is there a better way to do this?</p>
  
  <p>Many thanks in advance!</p>
  
  <p>EDIT: I realize I need to add that the subviews are stored in their own classes/xibs to keep their code seperated.</p>