This might be a duplicate of a few thread, but the solution I found to solve this problem didn’t work for me. My application is always starting in portrait mode, even though I have the next lines in my APP-Info.PList :
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
Thanks for you help
[EDIT 1] To be clearer about the problem
The application actually starts up in landscape mode but when I log the size of the screen in the viewDidLoad method of the rootViewController, it gives me the sizes for portrait mode. This is the actual problem, because I would like to add a subview to the main view which size depends on the orientation of the screen. I hope I was clearer.
Your AppDelegate has the
shouldAutorotateToInterfaceOrientation:Method. If it returns YES then any orientation will be allowed.Try this:
Hope this helps