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
For me, my modal view controller was a MoviePlayer and when it would be presented, it seemed that the status bar would be redrawn. When the view was dismissed, this second status bar would somehow create a 20px offset at the bottom of my screen, just above the tabbar controller.
To fix this, when the modal view controller was presented, I would hide the status bar. When the movie had finished playing and the modal view controller was going to be dismissed, I made the status bar visible.
- (void) moviePlayerLoadStateChanged:(NSNotification*)notification
{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
- (void) moviePlayBackDidFinish:(NSNotification*)notification
{
[[UIApplication sharedApplication] setStatusBarHidden:NO];
}