Ios7 iOS 7状态栏赢得';Don’’不管怎样,我都不会离开

Ios7 iOS 7状态栏赢得';Don’’不管怎样,我都不会离开,ios7,plist,xcode5,ios7-statusbar,Ios7,Plist,Xcode5,Ios7 Statusbar,我所开发的大多数应用程序都存在问题,在iOS7中,状态栏无法消失。对于iOS 6.1及以下版本来说一切都很好,但我所做的一切都没有让它消失 我的Plist中的设置如下所示: <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterface

我所开发的大多数应用程序都存在问题,在iOS7中,状态栏无法消失。对于iOS 6.1及以下版本来说一切都很好,但我所做的一切都没有让它消失

我的Plist中的设置如下所示:

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
UIStatusBarHidden=>YES
UIStatusBarHidden~ipad=>YES

在我的Xib文件中,我已确保我的视图将状态栏设置为“无”(请参见屏幕截图),尽管这两个设置都设置为“无”,但光荣的iOS7状态栏仍会不断出现

然后我想,也许我必须在应用程序启动期间将常规目标设置中的状态栏样式设置为隐藏(请参见屏幕截图),但这也没有效果


我花了好几个小时试着把这件事做好

解决这个问题的方法其实很简单。您需要将一个名为“查看基于控制器的状态栏外观”的设置添加到项目plist文件中,该设置需要设置为“否”

密钥对如下所示:

UIViewControllerBasedStatusBarAppearance
=>
NO

最后,您的plist应该如下所示:

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
UI支持接口方向
UIInterfaceOrientationPortrait
UIInterface方向和左视图
UIInterfaceOrientationAndscapeRight
UIStatusBarHidden
UIViewControllerBasedStatusBarAppearance