【发布时间】:2015-05-04 11:04:58
【问题描述】:
我目前正在开发适用于 iOS 7+ 和 XCode 6 的 SpriteKit 游戏。该游戏应始终以纵向模式呈现。到目前为止,我已经在我的视图控制器中实现了这些方法:
- (BOOL)shouldAutorotate {
return NO;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
只要我以纵向模式启动应用程序,我的 iPad 就可以正常工作。在游戏过程中它不会切换方向。
但在应用程序启动过程中将 iPad 保持为横向时,游戏会以横向显示。
即使设备在启动期间处于横向模式,我如何强制应用以纵向模式显示?
【问题讨论】:
标签: ios sprite-kit orientation screen-orientation uiinterfaceorientation