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 ha开发者_Go百科ving 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
Is the UISplitViewController
the "root" view controller of your app? Judging by your description, it's not clear, and it needs to be for an iPad app to work properly. (There are dozens of related questions to that gotcha here on Stack Overflow.)
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.
精彩评论