无法隐藏状态栏cocos2d iOS 7
问题描述:
我试图添加View controller-based status bar appearance: NO
和Status bar is initially hidden: YES
到plist,[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone]
和- (BOOL) prefersStatusBarHidden
到CCDirectorIOS和AppDelegate,没有人工作。无法隐藏状态栏cocos2d iOS 7
有什么我失踪?
答
在你的Info.plist设置状态栏最初是隐藏到YES和查看基于控制器的状态栏外观到NO。
查看更多在这里:https://www.makegameswith.us/gamernews/279/hiding-status-bar-ccmenu-fix-ios7
答
添加如下功能CCDirector.m文件。
- (BOOL)prefersStatusBarHidden {返回YES;}
确保将其添加到右侧的plist和干净的构建。 http://stackoverflow.com/questions/19134120/cocos2d-games-in-ios7-not-hide-status-bar/19134145#19134145 – Guru
是的,我已经尝试过,不起作用。我正在使用cocos2d 2.1。 – rod750
为什么亲密的人?你的preferStatusBarHidden方法返回YES吗? – YvesLeBorg