I have a navigationbar-positioning problem that seems to have appeared with iOS6.
It acts in many ways similar to the proplem some users are experiencing when rotating some views
The app has a splash screen, displayed full screen (achieved by setting Hide statusbar during application launch to True)
Then in viewDidLoad in my Master View Controller the following line adds the statusbar back to the app:
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
This adds the StatusBar to the app, and shifts the view downwards 20pt as expected.
However, the NavigationBar stays put, underneath the StatusBar with a 20pt glitch underneath.

Before iOS6 I used to fix this by adding the following line of code:
[UIApplication sharedApplication].keyWindow.frame=CGRectMake(0, 20, 320, [[UIScreen mainScreen] bounds].size.height-20);
Now, however, this do not work.
Some research shows that at the time of calling viewDidLoad, keyWindow.frame has a size and origin both of {0,0}, and altering it has no effect.
When inserting the two lines mentioned above to viewDidAppear I get the same behaviour when the app launches. When I dhen move to another view and back to the first view however, the alteration of keyWindow.frame has the desired effect and the NavigationBar ends up positioned where it should be.
My question then: How to make the NavigationBar gets it’s right position after adding the StatusBar to an iOS-app when the StatusBar is initially hidden?
Seems like I’m asleap at work again:
The effect of doing things in the other methods (
view[Will|Did]Appear) do not apply since the statusbar are already displayed by the calling fromviewDidLoad. I did remove the code from there and then got the desired effect fromviewDidAppear. Any of the methods called earlier do not alter the child frame. (NeitherviewDidLoadorviewWillAppearalters the frame of[UIApplication sharedApplication].keyWindow.frame)So this has to be done in
viewDidAppear. Just make sure the statusbar has not aleready been displayed in some of the methods called before…