Skip to content

Instantly share code, notes, and snippets.

@satishbabariya
Created March 2, 2018 09:28
Show Gist options
  • Save satishbabariya/0048cc8f048d392c878ced279b9c5f38 to your computer and use it in GitHub Desktop.
Save satishbabariya/0048cc8f048d392c878ced279b9c5f38 to your computer and use it in GitHub Desktop.
Change status bar color
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = CustomNavigationController(rootViewController: TabsController())
window?.makeKeyAndVisible()
//Change status bar color
let statusBar: UIView = UIApplication.shared.value(forKey: "statusBar") as! UIView
if statusBar.responds(to: #selector(setter: UIView.backgroundColor)){
statusBar.backgroundColor = UIColor.white
}
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment