Skip to content

Instantly share code, notes, and snippets.

@saoudrizwan
Created February 28, 2017 16:22
Show Gist options
  • Save saoudrizwan/4d56e8fbdbbf673946e0f7f83ccc0c72 to your computer and use it in GitHub Desktop.
Save saoudrizwan/4d56e8fbdbbf673946e0f7f83ccc0c72 to your computer and use it in GitHub Desktop.
Set initial view controller when not working with storyboards (don't forget to remove Main.storyboard from Build Settings)
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let vc = ViewController()
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = vc
window.makeKeyAndVisible()
self.window = window
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment