views:

381

answers:

2

I want to make a UISplitViewController in portrait mode just like in the Settings app. How can I do it?

A: 

From the UISplitViewController class documentation:

A split view controller supports the same interface orientations as its currently visible child view controllers. Both view controllers are displayed in landscape orientations but only the detail view controller is displayed in portrait orientations. When transitioning between orientations, the split view controller sends messages to its delegate object to coordinate the display of a popover with the hidden view controller. For more information on the methods of this delegate object, see UISplitViewControllerDelegate Protocol Reference.

(Emphesis added.)

Olie
The settings app isn't a split view controller. It's an awful mess of black-magic and it's not clear to me that Apple would allow an app that did that into the store. Caveat Developor! ;)
Olie
Yes, but this isn't helpful. OP cites a totally reasonably example of a UI that has a split portrait view and asks how to accomplish it. Saying "it's impossible" argues with the evidence, even if the technique is either undocumented or must be built from scratch.
quixoto
There is no evidence of a UISplitViewController in portrait mode -- that's what I'm saying. It's done with javascript and it's a terrible mess.And my answer IS helpful because if OP is thinking of submitting such an app, it is likely to get rejected. "Non standard UI", and all that.(Yes, yes, I understand the hypocrisy.)I'll try to find the link to the how-to-do-it in js )
Olie
Heh, in searching for the OTHER url, I ran across this SO question:http://stackoverflow.com/questions/2631672/ipad-splitviewcontroller-with-menu-in-portrait-mode-like-settings-appWhich has a good answer, including sample code.
Olie
+1  A: 

A bit late, but also take a look at the MGSplitViewController by Matt Gemmel. It does what you need and so much more. It's what UISplitViewController should be, and it's a snap to implement.

Mike A