I am trying to change the Title text Colour of NavigationController
in iOS
using Xamarin
but I am unable to change it.
Could someone please help me in achieving it?
I tried in this way and it worked for me.
var navigationBar = NavigationController.NavigationBar;
navigationBar.SetTitleTextAttributes(new UITextAttributes() { TextColor = UIColor.White });
Sathish
Edit:
UINavigationBar
no longer has the method SetTitleTextAttributes
. Instead you must set the TitleTextAttributes
property to a UIStringAttributes
property like so:
this.NavigationController.NavigationBar.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