UISplitViewController which is not a rootViewController

Yes, I know that Apple does not want to do this, but I want to do it.

I want to use another UISplitViewController as a modal controller.

I found some googling solutions,

  • create your own UISplitViewController

    Yes! it is simple, and some have already implemented it.

  • use one UISplitViewController and change its viewControllers property

    viewControllers property must be managed by the stack, as the UINavigationController does.

  • create another UIViewController and assign its view property from the UISplitViewController

    I made MyViewController and it has an instance of UISplitViewController from nib (or code)

    in viewDidLoad in MyViewController :

     self.view = splitViewController.view 

    and I use MyViewController as a modal controller.

    It shows UISplitViewController well, but UISplitViewControllerDelegate does not work because it is not a root view controller.

any suggestions, or which way do you recommend, friends?

+4
source share
2 answers

I just found the following that seems to solve my main problem (being able to use a split view as a child of a navigation controller):

http://www.codeproject.com/Articles/307008/Versatile-programmer-friendly-split-view-controlle

0
source

Yes, I know that Apple does not want to do this, but I want to do it.

Why do you want if you do not need? :)

If you are still looking for a simpler approach, please check out my answer to this similar thread .

0
source

All Articles