开发者

How to push a view controller over the UISplitViewController

How do I push a view control over a UISPlitViewController? Or How do I get the parent UIViewController of the UISplitViewController?

What I want to do is when a user clicks on a button a UiViewController will take up the enter ipad view.

I currently h开发者_JAVA百科ave this hierarchy:

Window
   UISplitViewController

I want to push a new UIController to take up or replace the UISplitViewController


Show your view controller from a view controller using presentModalViewController:animated: and it will by default cover up the entire screen and animate from bottom to top if you pass YES for animated.

MyModalViewController *mvc = [[MyModalViewController alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:mvc animated:YES];
[mvc release];


You can do [[UIApplication sharedApplication] getKeyWindow].rootViewController = newViewController;

I'm actually not sure if getKeyWindow is the exact method name, it might be something slightly different.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜