Skip to content

Instantly share code, notes, and snippets.

@CharlesAE
Last active October 15, 2018 03:42
Show Gist options
  • Save CharlesAE/46c403fa3ad0067f3728c6edc0004c3a to your computer and use it in GitHub Desktop.
Save CharlesAE/46c403fa3ad0067f3728c6edc0004c3a to your computer and use it in GitHub Desktop.
//..
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
//Manually create the application window
window = UIWindow(frame: UIScreen.main.bounds)
//Custom theming on the application
UIApplication.shared.statusBarStyle = .lightContent
application.isStatusBarHidden = false
UINavigationBar.appearance().isTranslucent = false
UINavigationBar.appearance().tintColor = .white
//Instantiate a navigation controller (nav1) and assign the randomly generated ViewController to it
let nav1 = UINavigationController()
nav1.navigationBar.isTranslucent = false
nav1.navigationBar.barTintColor = .darkGray
let vc = ViewController()
nav1.viewControllers = [vc]
//Set nav1 as the window's root viewcontroller
window?.rootViewController = nav1
//Show the window
window?.makeKeyAndVisible()
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment