iPad UISplitViewController Portrait Launch Issue
I solved it as I was typing this up, so this is now a tip for anyone else who discovers the same problem. My Google-fu was weak on this one.
The problem:
I'm setting up a fairly basic iPad app (converted to universal from an iPhone app, if that matters), and using a split view. View controller on the left, view controller on the right, nothing fancy. Rotating back and forth, everything works just fine. If I launch from landscape, everything is just fine.
If I launch from portrait, I have a problem. I should be seeing the right view controller, but I am instead seeing the left view controller, sized up to fill the screen. As soon as I rotate, everything goes back to normal, and stays normal. This only appears to be a problem with portrait launch.
The solution:
If you open up MainWindow.xib and select the split view controller, in the inspector (Cmd-1) there is an option for Layout "Wants Full Screen". The correct setting for this appears to be OFF. If it is on, you get the problem as I described it. Turn it off, everything works.
Corresponding problem this also solves:
Of course the left side is normally a navigation controller, and I had put buttons in the upper left and right, along with a title. When viewed from the popover, the buttons and title were shifted down, actually sliding behind the popover's view. The available space was fine, so this left a lot of margin at the top of the popover, but the display of the buttons was partially obscured.
|