开发者

UISplitViewController that is not rootViewController

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 ro开发者_JAVA技巧ot view controller.

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


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


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..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜