[英]Ipad in landscape mode and iphone in portrait mode
I need to set Portrait
mode when my application is running in a iPhone
and in Landscape
mode when running in iPad
. 当我的应用程序在
iPhone
运行时我需要设置Portrait
模式,在iPad
运行时需要设置为Landscape
模式。 I have change in info.plist
but i can't set it for iPad
or iPhone
. 我在
info.plist
有变化但我无法为iPad
或iPhone
设置它。
In your project target
, go to General
, then in the Development Info
section follow the attached images: 在
project target
,转到“ General
,然后在“ Development Info
部分中,按照附加的图像进行操作:
1-Make sure that your app is set to Universal
for the supported devices 1 - 确保您的应用设置为支持设备的
Universal
2-Chose iPhone and check Portrait. 2 - 选择iPhone并检查人像。
3-Chose iPad and check Landscape. 3-Chose iPad并检查横向。
In Xcode 9.2 have no option for selecting the orientation for ipad and iphone 在Xcode 9.2中没有选择ipad和iphone方向的选项
but we can able to change it in by info.plist whatever orientation we should need.. its much easy too. 但我们可以通过info.plist改变它,无论我们需要什么方向......它也很容易。
Reference : iPhone portrait-only app starts as landscape on iPad 参考: iPhone仅肖像应用程序在iPad上以横向方式启动
Check here for iPad: 点击这里查看iPad:
http://developer.appcelerator.com/question/134746/use-only-portrait-mode-on-ipad http://developer.appcelerator.com/question/134746/use-only-portrait-mode-on-ipad
and here for iPhone: how to support landscape/Portrait orientation only for one UIView 这里是iPhone: 如何只为一个UIView支持横向/纵向方向
Just a quick google.. 只是一个快速的谷歌..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.