Skip to content

Instantly share code, notes, and snippets.

@erica
Created December 26, 2016 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erica/52a0d386682b595db102c60c6c4bcb3e to your computer and use it in GitHub Desktop.
Save erica/52a0d386682b595db102c60c6c4bcb3e to your computer and use it in GitHub Desktop.
@UIApplicationMain class AppDelegate: UIResponder,
UIApplicationDelegate, UINavigationControllerDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
if let window = window {
let vc = MyViewController(nibName: nil, bundle: nil)
let nav = UINavigationController(rootViewController: vc)
window.rootViewController = nav
window.makeKeyAndVisible()
}
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment