sal*_*inx 4 orientation screen-orientation uiinterfaceorientation ios sprite-kit
我目前正在开发适用于iOS 7+和XCode 6的SpriteKit游戏.游戏应始终以纵向模式呈现.到目前为止,我已在视图控制器中实现了这些方法:
- (BOOL)shouldAutorotate {
return NO;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
Run Code Online (Sandbox Code Playgroud)
只要我启动应用程序将我的iPad保持在纵向模式,这样就可以正常工作.在游戏过程中它不会切换方向.
但是,在应用程序启动期间以横向方向按住iPad时,游戏会以横向显示.
即使在启动期间设备以横向模式保持,如何强制应用程序以纵向模式显示?
Har*_*ish 11
解决应用方向问题
Go to your projects plist file (should be "YourApp-Info.plist")
Add a row and enter "Supported interface orientations"
Add the orientations that your app supports
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1022 次 |
| 最近记录: |