手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

IOS7 隐藏状态栏

首页 > 苹果相关 >

 IOS7以下的版本中隐藏状态栏十分方便:

[[UIApplication sharedApplication] setStatusBarHidden:YES];
只要这么一句就解决问题了,但在IOS7中就不是这样了。有人说写代码,有人说info.plist里加一行即OK
说写代码的人是这样的:

‐ (BOOL)prefersStatusBarHidden {
    return YES; 

我试了好象无效
说改info.plist的人是这样的:

You should add this value to plist: "View controller­based status bar appearance" and set it to "NO". This would let you set the status bar to hidden mode and it's global not like other answers.

UPDATE: If you want that the status bar would be hidden on splash screen don't forget to mark "Hide during application launch" on target status bar options. Also, you can add "Status bar is initially hidden" to "YES" on the plist if you don't want to do it with code inside the app. 

试了之后。立马见效。
原文来自:http://stackoverflow.com/questions/17763719/status-bar-wont-disappear
 
 
 



本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

« 上一篇 | 下一篇 »

发表评论

评论内容 (必填):