title: iPhone SDK: CustomControls as in C#
body: <p>I have a UIViewController. The UIViewController has a NIB with one outlet - a UIView, containing several buttons and labels. Imagine, it is something like a UIDatePicker.</p>
  
  <p>In order to not be forced to copy and paste all the controlling code into a new environment, I was trying to encapsulate the UIView into a separate UIView subclass with an own NIB, sort of a C# CustomControl approach.</p>
  
  <p>From a controlling (other) UIViewController I'm instantiating the view from the NIB </p>
  
  <pre><code>NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"MyView" owner:self options:nil];
  selectorView = (DateTimeSelectorView*)[nibObjects objectAtIndex:0];
  </code></pre>
  
  <p>selectorView is a property in the using UIViewController class. The problem: "initWithFrame" of my UIView is never called. My UIView is covering the whole space (320x480), whereas it should have a smaller size. How can I achive this? Furthermore the UIView seems to hide all other controls, instantiated from the UIViewController class.</p>
  
  <p>Regards</p>