Resizing view when loading from a .nib file
<p>I have a <a href="http://en.wikipedia.org/wiki/Interface_Builder" rel="nofollow">.nib file</a> created in Interface Builder with 1 UIView item, but when I initialize it programmatically, the view doesn't cover up the entire screen, leaving a small portion of the view beneath it visible. </p>

<p>It looks like the Y coordinate is at some negative position instead of at 0. I don't have a Navigation bar configured for the view but if I were to set it, the bar doesn't get shown.</p>

<p>I'm creating the view like this inside the appDelegate class:</p>

<pre><code>MyCustomController *controller = [[MyCustomController alloc] initWithNibName:@"MyCustomView" bundle:nil];
[window addSubview:[controller view]];      
</code></pre>

<p>Settings in Interface Builder for the view:</p>

<pre><code>Orientation: Portrait
Status Bar: Gray
Top Bar: unspecified
Bottom Bar: unspecified
View mode: "Scale To Fill" 

View Size/Position: Set to "Layout" and the X/Y, Width/Height are readonly with 0,0,320,460
</code></pre>

<p>I've printed out the view's frame and [[UIScreen mainScreen] bounds] on 'viewWillAppear':</p>

<pre><code>view.frame on viewWillAppear - x: 0.0, 0.0, 320.0, 460.0
bounds - x: 0.0, 0.0, 320.0, 480.0
</code></pre>

<p>I'm not sure why the view is getting shifted - what's the best place to read just the frame size once the view is loaded by the 'initWithNibName' method? That seems to be the workaround I can think of.</p>
