In my Xamarin.Forms 4.4 project, I had defined the global colors for my navigation bar to be a solid orange with white text using the following code::
UINavigationBar.Appearance.BackgroundColor = UIColor.Orange;
UINavigationBar.Appearance.BarTintColor = UIColor.Orange;
UINavigationBar.Appearance.TintColor = UIColor.White;
UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes()
{
ForegroundColor = UIColor.White
};
Since upgrading my Xamarin.Forms NuGet package from 4.4 to 4.5, any app I run in iOS 13 has a solid white navigation bar in Light Mode with white text.
I know that there are some new classes to use for iOS 13. But, I don't understand is how to use these to get the same appearance, (or just something readable) in iOS 13. Here is what I have tried:
UINavigationBarApperance nba = new UINavigationBarAppearance();
nba.ConfigureWithOpaqueBackground();
nba.BackgroundColor = UIColor.Orange;
nba.BarTintColor = UIColor.Orange;
nba.TintColor = UIColor.White;
UINavigationBar.Appearance.ScrollEdgeAppearance = nab;
UINavigationBar.Appearance.StandardAppearance = nab;
UINavigationBar.Appearance.CompactAppearance = nab;
Here are my results:
I can actually see some color bleeding through what appears to be a white gradient overlay. I suspect the dark grey is a result of a dark gradient over my chosen color
NavigationPage
in Xamarin.Forms, it will be helpful to find where problem is . – Junior Jiang