In principle I want to implement a split view.
But I need the master to pop up not only in portrait orientation but in landscape orientation as well. Consequentally I do not want the view to be split at all in landscape orientation.
What is a proper way to implement that?
Is is smart using a split view at all or would you guys suggest an alternative approach?
You can do this in iOS 5 using the
UISplitViewControllerDelegatemethodsplitViewController:shouldHideViewController:inOrientation:.If you need to support iOS 4 then you will need to create a custom split view controller or use something like MGSplitViewController.
However, I would only do this if you are going to in fact show two view controllers split on the screen at once. This, really, is the main purpose of a split view controller. It sounds like you might not really need a split view controller, so I would consider just handling the popover yourself by presenting a
UIPopoverControllerof your master view controller from a button on your navigation bar. Then you can just use a standardUINavigationControlleras your root view controller.