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;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。