Skip to content

Instantly share code, notes, and snippets.

@Morbix
Created October 16, 2016 14:19
Show Gist options
  • Save Morbix/892adcf6001daa204c7d55017aa6a6eb to your computer and use it in GitHub Desktop.
Save Morbix/892adcf6001daa204c7d55017aa6a6eb to your computer and use it in GitHub Desktop.
Defining initial controller without storyboard
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = UINavigationController(rootViewController: PetsViewController())
window?.makeKeyAndVisible()
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment