cocos2d-js game center 闪退


更多 0

ios6.0 ios6.1启动后崩溃 Supported orientations has no common orientation with the application,and shouldAutorotate is returning YES 这是因为在项目的设置界面中设置了iphone的屏幕为垂直,但是在 MyNavigationController的 supportedInterfaceOrientations shouldAutorotateToInterfaceOrientation 两个函数里面返回的却是横屏导致的。


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

/*

if (ConfigParser::getInstance()->isLanscape()) {

return UIInterfaceOrientationIsLandscape( interfaceOrientation );

}else{

return UIInterfaceOrientationIsPortrait( interfaceOrientation );

}

*/

return UIInterfaceOrientationIsPortrait( interfaceOrientation );

}


// For ios6,use supportedInterfaceOrientations & shouldAutorotate instead

- (NSUInteger) supportedInterfaceOrientations{

/*

#ifdef __IPHONE_6_0

if (ConfigParser::getInstance()->isLanscape()) {

return UIInterfaceOrientationMaskLandscape;

}else{

return UIInterfaceOrientationMaskPortraitUpsideDown;

}

#endif

*/

return UIInterfaceOrientationMaskPortrait;

}

相关文章

    本文实践自 RayWenderlich、Ali Hafizji 的文章《...
Cocos-code-ide使用入门学习地点:杭州滨江邮箱:appdevzw@1...
第一次開始用手游引擎挺激动!!!进入正题。下载资源1:从C...
    Cocos2d-x是一款强大的基于OpenGLES的跨平台游戏开发...
1.  来源 QuickV3sample项目中的2048样例游戏,以及最近《...
   Cocos2d-x3.x已经支持使用CMake来进行构建了,这里尝试...