Xcode不遵循设备方向 [英] Xcode not obeying device orientation

查看:159
本文介绍了Xcode不遵循设备方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将设备方向设置为在Xcode中仅选中纵向". 但是,当我在模拟器中运行我的应用程序时,它会向各个方向旋转.

I have set the Device Orientation to have only 'Portrait' checked in Xcode. However when I run my app in the simulator, it rotates in all orientations.

我的Xcode设置

以纵向(预期)和横向(非预期)正确显示

有人遇到过同样的问题吗? 谢谢

Anyone faced same issue before? Thanks

推荐答案

Xcode中的常规"->部署信息" UI可能在欺骗.检查info.plist中的这两个键:

The "General"->"Deployment Info" UI in Xcode can be deceiving. Check these two keys in your info.plist:

UISupportedInterfaceOrientations

UISupportedInterfaceOrientations~ipad

这篇关于Xcode不遵循设备方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆