【问题标题】:StatusBar ignores `.lightContent` style only in iOS 15StatusBar 仅在 iOS 15 中忽略 .lightContent 样式
【发布时间】:2022-01-15 12:26:55
【问题描述】:

我有一个复杂的项目,使用 ViewController based status bar appearance = YESStatus bar style = Light Content、状态栏样式的动态更改等。在 iOS 14 中一切正常,但在 iOS 15 中,状态栏始终为黑色。

谁能指点帮助?

【问题讨论】:

    标签: ios swift xcode swiftui uikit


    【解决方案1】:

    试试这个:

    override var preferredStatusBarStyle : UIStatusBarStyle { return .lightContent }

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    • 感谢您的帮助。
    猜你喜欢
    • 2014-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-08
    • 2014-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-02
    相关资源
    最近更新 更多