laoyabao
laoyabao

Reputation: 3

How to change the Color of the Status Bar in iOS when using shell

I'm using Xamarin Forms v4.0.0.425677. When I use the shell, I set the BackgroundColor to #ff3A2E, and it's not working in 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>

it looks like there's a cover layer.

Upvotes: 0

Views: 760

Answers (2)

Eli
Eli

Reputation: 444

There is a workaround mentioned here from this bug report

Set

UINavigationBar.Appearance.Translucent = false;

in your AppDelegate.cs file

Upvotes: 0

user11639555
user11639555

Reputation:

For iOS you can try edit keys the Info.plist file, they might look like this:

<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

Upvotes: 1

Related Questions