无法在 iPad 上禁用旋转
Cannot disabled rotation on iPad
该应用程序已发布到 public 几个月没有任何问题。但是最近我发现当 运行 iOS 9 或更高版本时它可以在 iPad 上旋转屏幕。它在 iPhone.
上没有这样的问题
是iOS9的bug吗?还是我做错了什么?
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
return UIInterfaceOrientationMask.Portrait
}
override func shouldAutorotate() -> Bool {
return false
}
如果 Devices 是 Universal,它不会显示两者的 Orientation iPhone 和 iPad.
你应该选择Devices是iPad,然后设置Device Orientation.
该应用程序已发布到 public 几个月没有任何问题。但是最近我发现当 运行 iOS 9 或更高版本时它可以在 iPad 上旋转屏幕。它在 iPhone.
上没有这样的问题是iOS9的bug吗?还是我做错了什么?
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
return UIInterfaceOrientationMask.Portrait
}
override func shouldAutorotate() -> Bool {
return false
}
如果 Devices 是 Universal,它不会显示两者的 Orientation iPhone 和 iPad.
你应该选择Devices是iPad,然后设置Device Orientation.