How to hide navigation bar in iOS 7 specifically for cocos2D?

Simon picture Simon · Sep 26, 2013 · Viewed 9.5k times · Source

My app is made with cocos2D 2.1, and I am using Xcode 5. After compiling, the UINavigationBar appears in my app on the top.

How can it be hidden? I have tried the other generic iOS 7 codes that seem to work for native iOS 7 Apps:

// 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;

Answer

Mark picture Mark · Sep 26, 2013

Set UIViewControllerBasedStatusBarAppearance to NO in the project's Info.plist.