简体   繁体   English

iPhone和iPad纵向模式应用程序的不同反应

[英]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. 也许它可以帮助其他有类似疑问的开发人员。

info.plist文件中的设置

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.

相关问题 应用程序支持ipad和iphone中的应用程序横向和纵向模式 - App support the app Landscape and portrait mode in both ipad and iphone Ipad在横向模式下和iphone在纵向模式下 - Ipad in landscape mode and iphone in portrait mode iPhone应用程序在横向和纵向模式下都可以正常工作,但在iPad上只能在一种模式下工作? - Iphone app is working fine in both landscape and portrait mode but in ipad it only works in one mode? 在纵向和横向模式下为iPad设置不同的约束 - Set different constraints for iPad in portrait and landscape mode iPad兼容模式下的iPhone应用程序在横向上有奇怪的布局(我强迫肖像) - iPhone app on iPad compatibility mode has strange layout in landscape (while I force portrait) 启动应用程序Iphone纵向和Ipad横向 - Launch app Iphone portrait, and Ipad landscape 支持iPhone上的纵向方向的通用应用程序和iPad上的横向+纵向 - Supporting Universal App with Portrait Orientation on iPhone and Landscape+Portrait on iPad Iphone,iPad 屏幕尺寸,具有纵向和横向模式以编程方式 - Iphone, iPad screen size with portrait and ladscape mode in programmatic way 横向模式iPad应用程序中的坐标对应于纵向模式 - Coordinates in landscape mode iPad app correspond to portrait mode 纵向模式下的iPad视频 - iPad video in portrait mode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM