When starting the app, if the user doesn\'t have login information stored, I want to display a modal view controller to force the entry of this information. I found through
I had the same problem. My solution was to temporarily close the status bar just before switching views:
- (void) temporarilyHideStatusBar {
[[UIApplication sharedApplication] setStatusBarHidden:YES];
[self performSelector:@selector(showStatusBar) withObject:nil afterDelay:0];
}
- (void) showStatusBar {
[[UIApplication sharedApplication] setStatusBarHidden:NO];
}
// Use these by calling the hide function just before a broken view switch:
[self temporarilyHideStatusBar];
[self doViewSwitch];
// No need to call [self showStatusBar]; explicitly.
I experimented with other code-based solutions, and I like this one the best because it works 100% of the time - some of my frame-based solutions only worked most of the time - and because it has minimal user-visible effects.
I suspect this is an Apple bug, and it would be nice to hear the official word from them on the best workaround.