Skip to content

Instantly share code, notes, and snippets.

@omgbbqhaxx
Created August 31, 2016 22:28
Show Gist options
  • Select an option

  • Save omgbbqhaxx/f9fd2b71cbe404abef8d9978ae7fdc94 to your computer and use it in GitHub Desktop.

Select an option

Save omgbbqhaxx/f9fd2b71cbe404abef8d9978ae7fdc94 to your computer and use it in GitHub Desktop.
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Get view controllers from storyboard
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let mainViewController = storyboard.instantiateViewControllerWithIdentifier("MainViewController") as! MainViewController
let sideViewController = storyboard.instantiateViewControllerWithIdentifier("SideViewController") as! SideViewController
let loginViewController = storyboard.instantiateViewControllerWithIdentifier("LoginViewController") as! LoginViewController
let sideNavigationViewController = SideNavigationViewController(mainViewController: mainViewController, leftViewController: sideViewController)
// Configure the window with the SideNavigationViewController as the root view controller
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = sideNavigationViewController
window?.makeKeyAndVisible()
sideNavigationViewController.presentViewController(loginViewController, animated: true, completion: nil)
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment