简体   繁体   English

完全隐藏状态栏

[英]Hiding status bar completely

I hide the status bar in applicationDidFinishLaunching using 我使用以下方法将状态栏隐藏在applicationDidFinishLaunching中

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];

That works fine except the status bar is there while the app is loading. 正常运行,除了在加载应用程序时显示状态栏。 Meaning, when the default.png is displayed, I see the status bar. 意思是,当显示default.png时,我看到状态栏。 Is there a way to have the status bar not show at all? 有没有办法使状态栏根本不显示?

Add UIStatusBarHidden to your info.plist file, set to true. 将UIStatusBarHidden添加到您的info.plist文件中,设置为true。 Documentation here: 此处的文档:

http://developer.apple.com/library/ios/ipad/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html http://developer.apple.com/library/ios/ipad/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html

You need to use this: 您需要使用此:

[[UIApplication sharedApplication] setStatusBarHidden:YES];

and then open up the info.plist file, create a new line, chose Status bar is initial hidden and set it to true. 然后打开info.plist文件,创建新行,选择Status bar is initial hidden并将其设置为true。

You need to edit your Info.plist to include the entry "Status bar is initially hidden" and set the value to YES. 您需要编辑Info.plist,以包括“状态栏最初处于隐藏状态”条目,并将其值设置为YES。

在此处输入图片说明

For more information: http://www.idev101.com/code/User_Interface/StatusBar.html 有关更多信息: http : //www.idev101.com/code/User_Interface/StatusBar.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM