10

我的应用程序是用 制作的cocos2D 2.1,我正在使用Xcode 5. 编译后,UINavigationBar出现在我的应用程序顶部。

怎么可能隐藏?我尝试了其他似乎适用于本机 iOS 7 应用程序的通用 iOS 7 代码:

// None of the following works
navController_ = [[UINavigationController alloc] initWithRootViewController:director_];
navController_.navigationBarHidden = YES;
navController_.edgesForExtendedLayout = UIRectEdgeNone;
[navController_.navigationBar setTranslucent:NO];

if ([[CCDirector sharedDirector] respondsToSelector:@selector(edgesForExtendedLayout)])
    [CCDirector sharedDirector].edgesForExtendedLayout = UIRectEdgeNone;
4

2 回答 2

20

设置UIViewControllerBasedStatusBarAppearance为. NO_project's Info.plist

于 2013-09-26T06:27:23.730 回答
5

将此(带空格)添加到您的info.plist

View controller-based status bar appearance -> Value: NO

于 2013-10-27T08:05:53.527 回答