用什么代替 UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent?
What to use instead UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent?
请告诉我,有没有办法更改导航栏状态栏文本的颜色?
UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
在 iOS13.0
中已弃用
用什么代替UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
?
在info.plistView controller-based status bar appearance: YES
在class MyTabBarController : UITabBarController
(他设置了我的rootViewControllers)
override var preferredStatusBarStyle: UIStatusBarStyle {
return (UserDefaults.standard.object(forKey: "theme") == nil ? "light" : UserDefaults.standard.string(forKey: "theme")) == "dark" ? .lightContent : .darkContent
}
override var childForStatusBarStyle: UIViewController? {
return nil
}
请告诉我,有没有办法更改导航栏状态栏文本的颜色?
UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
在 iOS13.0
中已弃用用什么代替UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
?
在info.plistView controller-based status bar appearance: YES
在class MyTabBarController : UITabBarController
(他设置了我的rootViewControllers)
override var preferredStatusBarStyle: UIStatusBarStyle {
return (UserDefaults.standard.object(forKey: "theme") == nil ? "light" : UserDefaults.standard.string(forKey: "theme")) == "dark" ? .lightContent : .darkContent
}
override var childForStatusBarStyle: UIViewController? {
return nil
}