简体   繁体   English

无法禁用iPad上的旋转

[英]Cannot disabled rotation on iPad

The App has been released to public for months without any problem. 该应用程序已经发布了几个月,没有任何问题。 But recently I found it can rotate screen on iPad when running iOS 9 or later. 但是最近我发现,当运行iOS 9或更高版本时,它可以在iPad上旋转屏幕。 And it works without such problem on iPhone. 而且它在iPhone上也不会出现此类问题。

Is it a bug of iOS 9? 这是iOS 9的错误吗? or I make something wrong? 还是我做错了什么?

override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {

    return UIInterfaceOrientationMask.Portrait
}

override func shouldAutorotate() -> Bool {
    return false
}

在此处输入图片说明

If the Devices is Universal , it doesn't show the Orientation for both iPhone and iPad . 如果设备通用的 ,它不会同时显示iPhoneiPad方向

You should choose Devices is iPad , and set up Device Orientation . 您应该选择“ 设备iPad” ,然后设置“ 设备方向”

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

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