Search code examples
objective-cstatusbarios7

Cannot hide status bar in iOS7


I just upgraded my iPhone 5 iOS 7 to four beta version. Now when I run my app from Xcode 5 on this iPhone, status bar doesn’t hide, even though it should.

Not Working:

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];

Not Working:

[UIApplication sharedApplication].statusBarHidden = YES;

Can't login to Apple Developer Forums


Solution

  • in your apps plist file add a row call it "View controller-based status bar appearance" and set it to NO

    Note that this simply does not work, if you are using UIImagePickerController in the app.

    from http://www.openfl.org/developer/forums/general-discussion/iphone-5ios-7-cant-hide-status-bar/, mgiroux's solution

    An example adding View Base Controller to your Info settings in Xcode