iOS 7 Status Bar won't go away despite everything set to hide it

1.1k views Asked by At

I've been having an issue with most of the apps I've been working on where in iOS7 I cannot get the status bar to disappear. It's all perfectly fine for iOS 6.1 and below but nothing I was doing was making it go away.

My settings in my Plist look like this:

UIStatusBarHidden => YES UIStatusBarHidden~ipad => YES

In my Xib files I've made sure that my views have Status Bar set to None (see screenshot) yet despite both of these set the glorious iOS7 status bar keeps appearing.

Simulated metrics in Xcode showing status bar setting is none

I then thought that maybe I had to set the Status Bar Style in the General target settings to Hide during application launch (see screenshot) but this too had no effect.

Deployment info settings under General tab in Xcode

I have spent hours trying to get this one right!

1

There are 1 answers

0
justinhartman On BEST ANSWER

The solution to this is actually very simple. There is a setting you need to add to your project plist file called View controller-based status bar appearance which needs to be set to NO.

View controller setting for the plist file

The key pair is as follows:

UIViewControllerBasedStatusBarAppearance => NO

In the end your plist should look like this:

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>