Reputation: 4350
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 have this hierarchy:
Window
UISplitViewController
I want to push a new UIController to take up or replace the UISplitViewController
Upvotes: 1
Views: 1509
Reputation:
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];
Upvotes: 3
Reputation: 17598
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.
Upvotes: 0