无法在 iOS7 中隐藏状态栏 [英] Cannot hide status bar in iOS7

查看:38
本文介绍了无法在 iOS7 中隐藏状态栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的 iPhone 5 iOS 7 升级到了四个测试版.现在,当我在这台 iPhone 上从 Xcode 5 运行我的应用程序时,状态栏不会隐藏,即使它应该隐藏.

不工作:

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

不工作:

[UIApplication sharedApplication].statusBarHidden = YES;

<块引用>

无法登录 Apple 开发者论坛

解决方案

在您的应用程序 plist 文件中添加一行,将其命名为基于控制器的状态栏外观"并将其设置为 NO

请注意,如果您在应用中使用 UIImagePickerController,这根本不起作用.

来自 http://www.openfl.org/developer/forums/general-discussion/iphone-5ios-7-cant-hide-status-bar/,mgiroux的解决方案

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

解决方案

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

这篇关于无法在 iOS7 中隐藏状态栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆