队
我的应用程序没有响应iOS 7以后的Orientations。我试图通过pushViewController推送屏幕,然后我改为presentViewController
前
[viewController.navigationController pushViewController:landscapeCommentScreen animated:animated];
iOS7升级后:
[viewController.navigationController presentViewController:landscapeCommentScreen animated:YES completion:nil];
在视图控制器中添加了以下方法
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
- (BOOL) shouldAutorotate {
return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationLandscapeRight;
}
答案 0 :(得分:1)
您不应该在UIInterfaceOrientationMaskAll
中返回supportedInterfaceOrientations
。您应该返回UIInterfaceOrientationLandscapeRight
。