开发者

Ipad How to switch a View to a SplitViewController

This is what I want to do but not sure if it could be don开发者_如何学Goe.

my first view contains 3 buttons. When this view is displayed, I need to present a ModalPopup for the login. When the authenfication is done, the user can tap on one of the 3 buttons. When the button is taped, I need to switch this view to a TabBarController and active the correct TabBarItem regarding the button. Most of the TabBarItems can contain a SplitViewController.

I read several posts and tutorial about the SplitViewController but most of them show how to run a splitViewController from the appDelegate controller.

Then my first question would be.. is it possible :-) The second one, would be, how?

Thanks...


Mortoc is correct about UISplitViewController needing to be the root controller.

You can use MGSplitViewController as a drop-in replacement for UISplitViewController - and it doesn't have this limitation.

It sounds as if your hierarchy might be something like

UINavigationController (root)
  UIViewController (3 buttons)
  UITabBarController
    MGSplitViewController (1)
    MGSplitViewController (n)


Sorry, you'll have to roll your own SplitViewController equivalent. Apple only supports UISplitViewController as the root view item: it has to be the first view loaded in your application and it's size is fixed.

http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/iPadControllers/iPadControllers.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜