title: How can create a SplitViewController programmatically in Swift?
body: <p>What steps do I need to do? In Objective-C we created a <code>rootViewController</code> and <code>detailViewController</code>, after there added this controllers to <code>splitViewController</code>. For example:</p>
  
  <pre><code> - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      self.window.backgroundColor = [UIColor whiteColor];
      UISplitViewController *splitViewController = [[UISplitViewController alloc] init];
      MTTRootViewController *rootViewController = [[MTTRootViewController alloc] init];
      MTTDetailedViewController *detailedViewController = [[MTTDetailedViewController alloc]init];
      splitViewController.viewControllers = [NSArray arrayWithObjects:rootViewController, detailedViewController, nil];
      [self.window setRootViewController:(UIViewController*)splitViewController];
      [self.window makeKeyAndVisible];
      return YES;
  }
  </code></pre>
  
  <p>How can I do the same in Swift?</p>