Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 428
Melih Büyükbayram Avatar asked Aug 05 '13 13:08

Melih Büyükbayram


People also ask

How can I add status bar in iOS?

@learner Goto info. plist and then select any row. You will see a + sign. Click on Plus sign and from drop down, you should see Status bar style Option.

How do I hide my status bar on iPhone 7?

To completely hide it on the home screen, open up an app, such as Settings, and wait about three to four seconds. Press the home button again, and the status bar will be completely gone.

What is iOS status bar?

A status bar appears along the upper edge of the screen and displays information about the device's current state, like the time, cellular carrier, and battery level.

How do I hide the status bar on my iPhone?

Go to Your info. plist file. Add a key called “View controller-based status bar appearance” and set its value to NO.


1 Answers

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

like image 181
satgi Avatar answered Nov 15 '22 08:11

satgi