xcode 移除 iPhone 界面中的信息栏
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6379010/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Removing Info Bar in iPhone Interface
提问by user559142
How do you get rid of the info bar displaying the battery, time, carrier, etc when running my app? Is it something I have to do using Objective-C, or is there an option within Interface Builder?
在运行我的应用程序时,如何摆脱显示电池、时间、运营商等的信息栏?这是我必须使用 Objective-C 做的事情,还是 Interface Builder 中有一个选项?
回答by Mats Stijlaart
Go to your project info and add the key value:
转到您的项目信息并添加键值:
Status bar initialy hidden. Set this on YES.
状态栏最初隐藏。将此设置为 YES。
Or add this code to your app delegate:
或者将此代码添加到您的应用程序委托中:
[[UIApplication sharedApplication] setStatusBarHidden:YES];
回答by Cajunluke
There is a way to turn it off in both Interface Builder and in code. It's usually referred to as the "status bar" in Apple's documentation.
有一种方法可以在 Interface Builder 和代码中关闭它。在 Apple 的文档中,它通常被称为“状态栏”。