📜  快速更改状态栏颜色 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:00:57.734000             🧑  作者: Mango

代码示例1
override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    setNeedsStatusBarAppearanceUpdate()
}
override var preferredStatusBarStyle: UIStatusBarStyle {
    .lightContent
}