尝试更改状态栏样式在 ios 中给了我错误 - React native

Posted

技术标签:

【中文标题】尝试更改状态栏样式在 ios 中给了我错误 - React native【英文标题】:Trying to change the status bar style is giving me error in ios - React native 【发布时间】:2022-01-23 02:10:48 【问题描述】:

我做了一些研究,找到了 ios 文件,但不知道如何更改它。

<key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>

我应该将哪个部分设置为是?只有一个假标签。提前致谢。

【问题讨论】:

【参考方案1】:

设为YES是什么意思,类似于将false标签设为true标签,

<key>UIViewControllerBasedStatusBarAppearance</key>
    <true/>

或者, 如果您使用 xcode,请转到您的 Info.plist,检查键 View controller-based status bar appearance,其默认值为 NO,将其设为 YES。回来在你的vscode中检查一下,你会看到false标签被转换为true。

【讨论】:

以上是关于尝试更改状态栏样式在 ios 中给了我错误 - React native的主要内容,如果未能解决你的问题,请参考以下文章