title: Interface Builder: Resize View From NIB
body: <p>I have a custom <em>UIViewController</em> and a corresponding view in a nib file. The view is added to the <em>UIWindow</em> directly.</p>
  
  <pre><code>[window addSubview:customViewController.view];
  </code></pre>
  
  <p>Sizes of the window and the view are default (<strong>480x320</strong> and <strong>460x320</strong> correspondingly).</p>
  
  <p>When I create <em>CustomViewController</em> inside the nib file and check <strong>"Resize View From NIB"</strong> in IB Attributes tab everything works just fine.</p>
  
  <p>But when I create <em>CustomViewController</em> programmmatically with <em>initWithNibName</em> message the view is not positioned on the window correctly. There is an empty stripe at the bottom. Its height is 20px. I see it's because of status bar offset.</p>
  
  <p>IB handles that with <strong>"Resize View From NIB"</strong>. <strong><em>How to emulate that programmatically?</em></strong></p>
  
  <p>It seems that IB uses some custom subclass of UIViewController. So the question: <strong>how is "Resize View From NIB" implemented there?</strong></p>