简体   繁体   English

如何关闭状态栏?

[英]How do I turn the status bar off?

New view based project in XCode Go to main.xib and view.xib respectively In each case set status bar to none in attributes section for view XCode中基于视图的新项目分别转到main.xib和view.xib在每种情况下,将属性栏的状态栏设置为无

Not sure why it still shows both on simulator and on platform? 不确定为什么它仍然在模拟器和平台上都显示吗?

Have looked for something in code, but don't see what else is calling this? 已经在代码中寻找了东西,但是看不到这又叫什么?

Anybody know how to turn the status bar off? 有人知道如何关闭状态栏吗?

Thanks // :) 谢谢 // :)

Figured it out... 弄清楚了...

Using Snow Leopard and the XCode 3.2, you simply edit the Apps Info.plist. 使用Snow Leopard和XCode 3.2,您只需编辑Apps Info.plist。

Right click the open Info.plist and add a row. 右键单击打开的Info.plist并添加一行。

Select "Status Bar Style" from the drop down list. 从下拉列表中选择“状态栏样式”。 In the column to the right type in UIStatusBarHidden. 在右边的列中,输入UIStatusBarHidden。

To affect this more dynamically this can be used instead: 为了更动态地影响它,可以改为使用:

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; [[UIApplication sharedApplication] setStatusBarHidden:是动画:否]; should hide the status bar. 应该隐藏状态栏。

// :) // :)

接口构建器中关闭的状态栏不会消失,请使用UIApplications-(void)setStatusBarHidden:(BOOL)隐藏动画:(BOOL)在此处设置动画http://developer.apple.com/iphone/library/documentation/UIKit /Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/setStatusBarHidden:animated

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

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