Search code examples
iosiphoneios7statusbar

iOS7 Hiding the status bar


I've tried everything I can think of/find to hide the status bar on iOS 7, but after the launch it appears:

//in viewDidLoad
    [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];

//in the main view controller
- (BOOL)prefersStatusBarHidden
{
    return YES;
}

I also set "Status bar is initially hidden", and "View controller-based status bar appearance" to YES in the info.plist.

Oddly, the status bar does hide after another controller appears, like a picker or the keyboard.


Solution

  • Try adding a new value to your info.plist:

    View Controller based status bar appearance - NO