I need you help with the auto rotate function in Xcode. I have designed an iPad app in landscape and due to restriction it must always be in landscape (left home button). In the .plist I have set the supported interface orientations to only landscape (left home button) and when I run this in the simulator it opens correctly. If I rotate this left or right I would expect the view to rotate with the simulator but this is not the case. My understanding is that by default auto rotate is disabled. Has anyone had a similar issue or know how to stop this rotating?
Thanks for your help.
In the .plist file you only specify your startup orientations. After that every view controller can implement
shouldAutorotateToInterfaceOrientation:in which the view controller is “asked” if a rotation to another orientation is acceptable. In the standard template for iPad apps this always returnsYESand thus allows all orientations. In your case you might only returnYESwhen the given orientation isUIInterfaceOrientationLandscapeLeft, although you should have a look if you can support both landscape orientations as Apple human interface guidelines strongly suggest to at least support both landscape orientations if one is supported.Note that every view controller in your app has to specify its own orientations as it may make sense to have some views more restricted than others.
For further information on this have a look at: