【发布时间】:2012-10-13 20:04:39
【问题描述】:
在给出解决方案之前已在此处询问过此问题,但无法正常工作
iOS 6 Game Center Crash on Authentication
检查一下我有同样的问题。链接中的上述代码解决了它,GameCenter 工作,但现在 cocos2d 游戏旋转,这给游戏带来了问题。有没有人解决它或对此有任何解决方案
也试过这个,但我认为它不起作用GameCenter authentication in landscape-only app throws UIApplicationInvalidInterfaceOrientation,因为我使用的是 cocos2d 场景。
目前我正在实施此代码来解决问题,因为我别无选择。
-(NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
我需要的解决方案是简单地打开游戏中心而不会崩溃,同时将代码锁定为横向(将所有 cocos2d 场景保持在横向) 任何帮助,将不胜感激。提前谢谢你。
【问题讨论】:
-
你用的是cocos2d 1.x还是2.x??
-
这个答案可能对你有帮助。stackoverflow.com/questions/12488838/…
-
尝试为方法应用程序supportedInterfaceOrientationsForWindow返回UIInterfaceOrientationMaskLandscape
标签: ios cocos2d-iphone game-center