c# - 使用shell时如何更改iOS中状态栏的颜色
问题描述
我正在使用Xamarin Forms v4.0.0.425677
. 当我使用 shell 时,我将 BackgroundColor 设置为#ff3A2E
,它在 iOs 中不起作用。
<code>
public AppShell()
{
InitializeComponent();
SetTabBarBackgroundColor(this, Color.FromHex("#D9D9D9"));
SetTabBarTitleColor(this, Color.FromHex("#FF3A2E"));
SetTabBarUnselectedColor(this, Color.FromHex("#FF3A2E"));
SetBackgroundColor(this, Color.FromHex("#FF3A2E"));
}
</code>
看起来有一个覆盖层。
解决方案
对于 iOS,您可以尝试编辑Info.plist
文件的键,它们可能如下所示:
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
推荐阅读
- algorithm - 平均情况下 nlogn 螺母和螺栓匹配
- python - 如何使用 python 将多个文本文件中的整数加到一个新的文本文件中?
- solidity - Chainlink 上的 VRF 协调器合约是什么?
- google-cloud-platform - 什么问题导致 Google AI Platform 视频批量预测无法处理输入文件
- android - 使用 PIN 码的 Google TV Casting
- ruby-on-rails-6 - 无法运行资产:由于初始化程序而预编译
- flutter - Flutter & google maps 如何保存用户轨迹
- react-testing-library - React 测试库与 JsDom
- java - 如果字符串是某个字母,我如何获取用户输入并用某个字符替换字符串的最后 2 位数字
- css - 如何使溢出对象可滚动或从右侧开始?