4

Yes, I know Apple doesn't want to do that, but I want to do.

I want to use another UISplitViewController as modal view controller.

I found some solutions by googling,

  1. make your own UISplitViewController

    yes! it's simple and some already implemented it.

  2. use one UISplitViewController, and change its viewControllers property

    viewControllers property have to managed by stack, like UINavigationController does.

  3. make another UIViewController, and assign its view property that is from UISplitViewController

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

    in viewDidLoad in MyViewController:

    self.view = splitViewController.view
    

    and I'm using MyViewController as modal view controller.

    It shows UISplitViewController well, but UISplitViewControllerDelegate doesn't work because it is not root view controller.

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

omz
  • 53,243
  • 5
  • 129
  • 141
moon6pence
  • 712
  • 9
  • 24
  • 2
    You can use a UISplitViewController as a modal view controller, because it will be the root of a new navigation stack (or it will be the only view controller), you might just have to use UIModalPresentationFullScreen. – jtbandes Aug 23 '11 at 04:18
  • According to this [answer][1] it is not possibly using Interface Builder. [1]: http://stackoverflow.com/a/12307948/593214 – BrandonG Sep 06 '12 at 20:35

2 Answers2

0

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

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

Matt Holgate
  • 533
  • 1
  • 4
  • 10
0

Yes, I know Apple doesn't want to do that, but I want to do.

Why do you want to, if you don't have to? :)

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

Community
  • 1
  • 1