I'd like to know how to change the navigation bar title's color. This is how it should be done in swift:
UINavigationBar.appearance().titleTextAttributes =
[NSForegroundColorAttributeName : UIColor.white]
How can I replicate that behavior using Xamarin.iOS?
I tried working with the answers here What to use for AttributeName in Xamarin Mac but I couldn't make it work because it could not convert from NSMutableAttributedString
to UIStringAttributes
.
Thanks.
This is how you do that:
UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes
{
ForegroundColor = UIColor.White
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With