Cannot disabled rotation on 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. And it works without such problem on iPhone.



Is it a bug of iOS 9? or I make something wrong?


override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {

return UIInterfaceOrientationMask.Portrait
}

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



enter image description here





Can you choose the "Devices" is "iPad", and what is "Device Orientation" show up?
– anhtu
Oct 24 '15 at 2:11





@anhtu Wow, you're right! The problem solved. It's been working good on iOS 8, so I thought it as a correct setting ;-( . Can you post the answer in "Answer Your Question" so that I can accept it? Thanks.
– jdleung
Oct 24 '15 at 2:20




1 Answer
1



If the Devices is Universal, it doesn't show the Orientation for both iPhone and iPad.



You should choose Devices is iPad, and set up Device Orientation.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

How to set up datasource with Spring for HikariCP?

Display dokan vendor name on Woocommerce single product pages