简体   繁体   English

防止 iPad 上的显示旋转

[英]Prevent display rotation on iPad

In Xcode in Device orientation section only "Portrait" is selected.Device orientation部分的 Xcode 中,仅选择了“纵向”。 On iPhone it works properly, when phone rotated to landscape mode it still works as portrait, so no changing.在 iPhone 上它可以正常工作,当手机旋转到横向模式时,它仍然可以作为纵向工作,所以没有变化。 But on iPad (6th generation) when display is rotated to landscape mode actual screen in my app is also rotated, but without autoscaling.但是在 iPad(第 6 代)上,当显示旋转到横向模式时,我的应用程序中的实际屏幕也会旋转,但没有自动缩放。 But I don't want that it will be possible to rotate screen on iPad.但我不希望在 iPad 上旋转屏幕。 Do I need to fix it by code or some other settings on Xcode besides "Device Orientation" settings除了“设备方向”设置之外,我是否需要通过代码或 Xcode 上的其他设置来修复它

肖像

景观

So in the info.plist for your app you just gotta go to "Supported interface orientation (iPad)" open that section up with the disclosure triangle and delete the items you don't want to rotate to for the iPad!因此,在您的应用程序的 info.plist 中,您只需将 go 设置为“支持的界面方向 (iPad)”,使用显示三角形打开该部分并删除您不想为 iPad 旋转到的项目!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM