Search code examples
iphonecocoa-touchipadios32

Orientation is being incorrectly changed in an iPad Application


I have an application that starts with a Login screen (UIViewController) and then once the user completes the login, the rest of the application is managed by a SplitViewController. The problem I'm having is that when the SplitViewController is first displayed, it overwrites the current screen orientation, it forces portrait mode even if I'm holding the device in landscape.

I've searched all the settings, my code and the xml in the .xib files, I can't find anything that would cause the orientation to change. Has anyone else had this issue, or can anyone think of another place to look for the cause?

Thanks


Solution

  • The problem turned out to be that if the SplitViewController isn't your first View to be loaded, the app won't initialize correctly. I solved the problem by changing my login view from being the view the app loads with to being a full screen dialog that covers the SplitViewController.