手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2013年10月11日的文章

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
 
 
 

杂事儿乱弹

1、国庆好象就那么几个特色,人多,车多,路堵,没地方住。

2、10月10日过了。开始戒酒了

3、调整作息时间 ,准备将晚上改为休息时间 ,然后早起写东西,觉得这样的效率可能会更高,对身体也好,而且早起的话,记事学习都比较有效吧?