Status Bar Style and background color in Swift 3
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
extension UIApplication {
var statusBarView: UIView? {
return value(forKey: "statusBar") as? UIView
}
}
UIApplication.shared.statusBarView?.backgroundColor = .red