我制作了我的 gles 应用程序,并在我的 iPad 上对其进行了测试。它应该只在横向模式下工作,所以我Info.plist
喜欢这个
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
我只为 iPhone 设置了横向右,所以启动画面正确显示(似乎你不能在 iPhone 上为横向右和横向左设置单独的启动画面)
该应用程序运行良好,但在朋友的 iPhone 上,该应用程序以纵向模式运行,并且不会旋转到任一横向模式。旋转锁定已关闭。
我没有特别从我的代码中做任何事情来支持旋转,因为只是Info.plist
在我的 iPad 上完美地设置我的工作。
iPhone模拟器自动变成横向,即使我旋转它也保留横向渲染。
这可能是什么原因造成的?我还尝试允许两个景观旋转,但没有骰子。