I have a UIViewController
that is conditionally hiding the status bar in the application, but a problem I'm having is that when I have the status bar hidden and I change to a different application with a status bar, the view moves up 20 pixels to compensate for the missing status bar, even though I've already compensated for it.
I'm hiding the status bar like so:
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
and showing it again with:
[[UIApplication sharedApplication] setStatusBarHidden:NO];
I've also tried adding this to my hide:
[self setWantsFullScreenLayout:YES];
and this to my show:
[self setWantsFullScreenLayout:NO];
Why is my view adjusting automatically upon me switching applications?