如何根据此方法重写代码段; iOS 9.0中已弃用“ statusBarStyle”的二传手:使用-[UIViewController preferredStatusBarStyle]
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
UIApplication.shared.statusBarStyle = .lightContent
return true
}
答案 0 :(得分:0)
这是状态栏样式的新方法
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}