加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

cocos2d-js game center 闪退

发布时间:2020-12-14 20:48:50 所属栏目:百科 来源:网络整理
导读:更多 0 ios6.0 ios6.1启动后崩溃 Supported orientations has no common orientation with the application,and shouldAutorotate is returning YES 这是因为在项目的设置界面中设置了iphone的屏幕为垂直,但是在 MyNavigationController的 supportedInterfa

更多 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;

}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读