[英]iPhone and iPad Portrait mode app different reaction
I have an app which I have locked to Portrait mode from project settings. 我有一个应用程序,该应用程序已从项目设置锁定为人像模式。 Also should rotate is false etc. On the simulator (and devices) when I am on an iPhone device and rotate the labels and views stay on their places.
还应该旋转是假的等。在模拟器(和设备)上,当我在iPhone设备上旋转标签和视图时,请留在原处。 But on the iPad when I change to landscape the views try to re-arrange.
但是在iPad上更改风景时,尝试重新排列视图。 Why is this happening?
为什么会这样呢? Thank you.
谢谢。
As mathew said try something like this 正如马修所说,尝试这样的事情
Following the advice of @ScarletMerlin , changing the keys in info.plist is, in my opinion, the best solution for the requirements I have to fulfill (fixed orientation type for each kind of device). 我认为,按照@ScarletMerlin的建议,更改info.plist中的键是满足我必须满足的要求的最佳解决方案(每种设备的固定方向类型)。
Here is a print screen from the settings I use. 这是我使用的设置的打印屏幕。 Maybe it can help other developers with similar doubt.
也许它可以帮助其他有类似疑问的开发人员。
The relavent source code looks like this: 相关的源代码如下所示:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.