Search code examples
objective-ciosorientationscreen-orientationdevice-orientation

iOS app starts in landscape mode


I have a strange problem. My app keeps starting in landscape mode. If I open it in simulator it rotates to landscape mode automatically. When I start it on iPhone it firstly starts in landscape mode and then shortly after it rotates to correct position. I have set "Initial interface orientation" in .plist to portrait, but that changed nothing.


Solution

  • I had the same problem. If you go to your Supported Interface Orientations you'll see Item 0 ... Item 1 ...

    And so on. If you edit this list so that Portrait (bottom home button) is the first item in the list then your app will open in portrait mode. You can still support other orientations as items 1 thru 3.