Created
March 28, 2019 05:02
-
-
Save freddyh/e7b3725d83dfe121a929aa1487e77a27 to your computer and use it in GitHub Desktop.
Set 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
extension UIViewController { | |
override func viewWillAppear(_ animated: Bool) { | |
super.viewWillAppear(animated) | |
self.setNeedsStatusBarAppearanceUpdate() | |
} | |
override var preferredStatusBarStyle : UIStatusBarStyle { | |
return .lightContent | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment