Created
August 31, 2016 22:28
-
-
Save omgbbqhaxx/f9fd2b71cbe404abef8d9978ae7fdc94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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