title: Subclassing a subclassed UIViewController that has a xib
body: <p>I need to have a few UIViewControllers that look very similar yet have different behaviours, so I thought I'd make a general UIViewController subclass with a xib, then subclass it when I need to, for those different UIViewController's that look alike.</p>
  
  <p>I'm trying to achieve the following</p>
  
  <p>UIViewController subclass (that has a xib file associated) -> and being able to subclass it as many times as i'd like (without additional xib files for the children)</p>
  
  <p>what I've done so far :</p>
  
  <p>xib file represents a UIViewController with multiple UI Elements.</p>
  
  <p>I've set all the connections to file's owner @ xib file.</p>
  
  <p>the subclass with the xib contains this @ init method:</p>
  
  <pre><code>self = [[[NSBundle mainBundle] loadNibNamed:
                   [NSString stringWithFormat:@"ParentViewController"]
                                                owner:self options:nil] objectAtIndex:0];
  </code></pre>
  
  <p>when I connect the View property in the xib to file's owner I get an exception saying I can't
  have the View property connected to both parent and child UIViewControllers.</p>
  
  <p>yet when the View property is only connected to the UIViewController that the xib is associated with, I get a blank screen, and that outlet isn't disconnectable.</p>
  
  <p>If I instantiate the parent vc instead of the child, everything works fine,
  If everything is done programatically and not with a xib, also everything works fine. </p>
  
  <p>since this UIViewController displays A LOT of UI elements, I'm trying to set it with a xib.</p>
  
  <p>I just don't really understand how can I get the child ViewControllers to look like the parent's xib file and have their own additions and behaviours.</p>