简体   繁体   English

更改 iOS 上的状态栏颜色

[英]Change the status bar color on iOS

I'm trying to change the statusBar background color, but the property only works on Android.我正在尝试更改 statusBar 背景颜色,但该属性仅适用于 Android。 I tried all kinds of examples to try to modify it on iOS, but nothing has worked so far.我尝试了各种示例以尝试在 iOS 上对其进行修改,但到目前为止没有任何效果。 The last thing I tried is the best answer from this question.我尝试的最后一件事是这个问题的最佳答案。 Needless to say, it didn't worked either.不用说,它也没有奏效。

I'm currently working on Xcode 12 with the iOS 14 SDK.我目前正在使用 iOS 14 SDK 研究 Xcode 12。

use react-native-safe-area-context instead SafeAreaView and customize it.使用react-native-safe-area-context代替SafeAreaView并对其进行自定义。

see my answer here在这里查看我的答案
. .

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM