how to make the view go to top when I hide the status bar
<pre><code>- (void)viewWillAppear:(BOOL)animated {

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];

[navigationController setNavigationBarHidden:YES animated:YES];
}
</code></pre>

<p>The above code works perfectly fine and when the view is about to appear, a nice animation begins and after that, both the status bar and navigation bar are hidden.</p>

<p>BUT! My 320x480 view is not moved up to the top (0,0) as I want it to, but it is moved to where the navigation bar was, UNDER the (hidden) status bar. Where the status bar was, is blank, and the bottom of my view is cut off from the window. I find this rather strange because as you can see, I am using a UINavigationController to switch views and I am hiding the navigation bar as well, and the view does move 44px up, compensating the disappearing of the navigation bar. It just doesn't take the height of the status bar into account.</p>

<p>Same problem is on my camera view controller: a view in which camera is opening but view is  not from top</p>

<p>Any one have idea how to fix this problem ?</p>
