完全隐藏状态栏

时间:2009-06-19 15:59:37

标签: iphone cocoa-touch

我使用

隐藏了applicationDidFinishLaunching中的状态栏
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];

除了在加载应用程序时状态栏存在时,它工作正常。这意味着,当显示default.png时,我会看到状态栏。有没有办法让状态栏不显示?

3 个答案:

答案 0 :(得分:3)

答案 1 :(得分:2)

你需要使用它:

[[UIApplication sharedApplication] setStatusBarHidden:YES];

然后打开info.plist文件,创建一个新行,选择状态栏初始隐藏并将其设置为true。

答案 2 :(得分:1)

您需要编辑Info.plist以包含“状态栏最初隐藏”条目,并将值设置为YES。

enter image description here

了解更多信息: http://www.idev101.com/code/User_Interface/StatusBar.html

相关问题