Created
March 2, 2018 09:28
-
-
Save satishbabariya/0048cc8f048d392c878ced279b9c5f38 to your computer and use it in GitHub Desktop.
Change status bar color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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