I am writing an iPad app in XCode 4 and would like to create a UISplitViewController instance that displays its viewController references horizontally on the screen. I have been referring to the XCode example provided by Apple (SplitViews) but that example uses a xib to embed two horizontal NSTextViews manually created by the developer.
Is there a way to force a split view to display horizontally using the standard XCode libraries? I've seen a few references to Matt Gemmell's MGSplitViewController class but I am wondering if this can be done using just XCode's standard libraries.
I've also read the thread concerning programmatic split views (here) but there is no mention of forcing the display to horizontal vs. vertical.
UISplitViewController
splits the screen into left and right parts. There is no public API (as of iOS 6.1) to tell it to split into top and bottom parts.
You could embed the UISplitViewController
's view in a custom view with a rotation transform, and then make each of the contained views use a rotation transform in the opposite direction. That would require you to implement some extra view controller subclasses (and maybe view subclasses). It would be much simpler to just use MGSplitViewController
, or to implement your own split view controller.