title: Can I Show A SplitViewController Using presentModalViewController?
body: <p>I don't know if what I'm trying to do is possible, but because I haven't the desired results, I guess not.<br/>
  What I'm trying and need to do is to call a SplitViewController from a previous ViewController, using presentViewController.<br/>
  I know, SplitViewController have to be the rootViewController, but I need to explore the most possible options to achieve what I need to do.<br/>
  I have a MainMenu with buttons, and with every button, I need to call a SplitViewController. First, how can do this?<br/>
  What I'm trying to do is this:
  First, in AppDelegate I'm calling the MainMenu, and add as a subview and other things:</p>
  
  <pre><code>-(BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     [window addSubview:self.mainMenu.view];
     [self.mainMenu presentModalViewController:self.firstMenu animated:NO]; 
     [self.window makeKeyAndVisible];
  
     return YES;
  }
  </code></pre>
  
  <p>Then, in the MainMenu, I'm calling SecondViewController, in modal view, using this code:</p>
  
  <pre><code>SecondViewController *secV = [[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
  secV.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
  [self presentModalViewController:secV animated:YES];
  </code></pre>
  
  <p>In this SecondViewController, I'm creating SplitViewController, with Master &amp; DetailViewController's, using this code:</p>
  
  <pre><code>-(void)viewDidLoad{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
  
    UISplitViewController *splitViewController = [[UISplitViewController alloc]init];
  
    SecondMenuViewController *secMenu = [[SecondMenuViewController alloc]init];
    UINavigationController *navLef = [[UINavigationController alloc]init];
    [navLef pushViewController:secMenu animated:NO];
  
    SecondMainViewController *secMain = [[SecondMainViewController alloc]init];
    UINavigationController *navRig = [[UINavigationController alloc]init];
    [navRig pushViewController:secMain animated:NO];
  
    splitViewController.delegate = secMain;
    splitViewController.viewControllers = [NSArray arrayWithObjects:navLef, navRig, nil];
  
    MainAppDelegate *mainApp = [[MainAppDelegate alloc]init];
    [mainApp changeRootViewController:splitViewController];
  
    navRig = nil;
    navLef = nil;
    secMain = nil;
    secMenu = nil;
    splitViewController = nil;
  }
  </code></pre>
  
  <p>As you can see, I'm calling a method in MainAppDelegate, to change view and RootViewController, because SplitViewController have to be RootViewController. This is the method:</p>
  
  <pre><code>-(void)changeRootViewController:(UISplitViewController *)splitViewController{
     [self.window addSubview:splitViewController.view];
     self.window.rootViewController = splitViewController;
  }
  </code></pre>
  
  <p>I know, this looks like a mess. And when I run, the SplitViewController never shows, so I assume, what I'm trying to do is not possible? Or In what I'm wrong?
  If it is everything, what can I do to show a SplitViewController after my MainViewController? <br/>
  I'm using XCode4.4 and iOS5
  Thank you very much</p>