The current rootViewController
of window in my app is MainViewController
. and there's a button in another view controller called SubViewController
, I want to show UISplitViewController
if a user click the button. I have implemented it as following:
//SubViewController.m
UISplitViewController *splitVC =[self splitVC];
self.view.window.rootViewController = splitVC;
there's no animation to show splitVC
, I need to show it with slide style, example, to slide the SubViewController
.view to right to show the UISplitViewController
, and if the user click a button on UISplitViewController
, to slide back the SubViewController.view
Try it this way:
You can specify different animation types with the
options
parameter