'Xamarin.iOS does not paint secondary toolbar in the requested color
In my Xamarin project, in the header of the XAML file, I have set:
Shell.BackgroundColor="DarkGreen"
Part of xaml header declaration looks like that:
On Android all things are ok (check the picture below), but on iOS the secondary toolbar (shown in red square) is white, and I can't understand why does it happen and how can I fix this issue?
Solution 1:[1]
You can add on itemsApp->AppDelegate.cs->FinishedLaunching method:
if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
{
UITabBar.Appearance.TintColor = UIColor.Blue;
UINavigationBar.Appearance.BackgroundColor = UIColor.Blue;
}
The complete method for FinishedLaunching is:
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
{
UITabBar.Appearance.TintColor = UIColor.Blue;
UINavigationBar.Appearance.BackgroundColor = UIColor.Blue;
}
return base.FinishedLaunching(app, options);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Wen xu Li - MSFT |


