Setting UIApplication statusBarHidden to YES does not work in iOS 7

折月煮酒 提交于 2019-12-31 02:01:10

问题


I've been using

[UIApplication sharedApplication].statusBarHidden = YES; 

to hide the status bar when users enter specific UIViewControllers in iOS 6 and it worked great. In iOS 7 however it still shows a translucent overlay.


回答1:


EDITED:::

that is new updated answer :
Do in plist file

"View controller-based status bar appearance" to NO and write code

     [UIApplication sharedApplication].statusBarHidden = YES; 

in appdelegate




回答2:


What worked for me was setting "Status bar is initially hidden" to YES in my app's Info.plist.



来源:https://stackoverflow.com/questions/18897983/setting-uiapplication-statusbarhidden-to-yes-does-not-work-in-ios-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!