Search code examples
ipadcocoa-touchuisplitviewcontroller

Showing a UISplitViewController inside a pop over


I'm wanting to create a UI where I have a popover that comes from a button that and contains a split view UI with two table view controllers side by side.

The storyboard I have now has a normal page with a button, the button has a popover segue to a split view controller.

The split view controller has a master relationship to a navigation controller which has a root view controller of a table view controller.

The split view controller has a detail view controller to another navigation controller which again has a root view controller of a table view controller.

When I launch the pop up it only ever displays the master controller, not the two side by side.


Solution

  • UISplitViewCpntroller can only be the root view of an app - as such, you cannot put them in a UIPopover or any other non-root view.

    You would have to create your own UISplitViewCpntroller type view (or look for some open source code).