15

I set Project Summary > iPhone / iPod Deployment Info > Supported Interface Orientations to portrait only mode.

This work well on All simulatiors , iPad(iOS 5.1) and iPhone(iOS 6.1).

But after I upgrade iOS on iPad from 5.1 to 6.1.2 then

The application running on iPad become landscape (left+right) mode at application start up.

How could I fix this?

user1047504
  • 578
  • 7
  • 14

2 Answers2

32

Try going to YourApp-Info.plist file in Supporting Files and make sure the proper orientations are set for both Supported interface orientations and Supported interface orientations (iPad)

konrad.bajtyngier
  • 1,786
  • 12
  • 13
  • after add portrait to Supported interface orientations. I got an error 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES' – user1047504 Mar 14 '13 at 09:18
  • guess you were missing the `-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation`? but you got it to work it seems:) glad to help – konrad.bajtyngier Mar 14 '13 at 13:51
3

Add the UISupportedInterfaceOrientation into your info.plist, with a setting for each orientation you support.

Artem Shmatkov
  • 1,434
  • 5
  • 22
  • 41