I am trying to change the font of a secondary ToolBarItem in iOS on Xamarin Forms. I have managed to change the font throughout the app on every element except this one. I have tried overriding the ViewWillAppear method on both the custom control renderer and the content page renderer for iOS. I have set the font size and color just for ease of detecting success but had no luck yet.
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
var textAttributes = new UITextAttributes()
{
TextColor = Color.Red.ToUIColor(),
Font = UIFont.FromName("OpenSans-Regular", 26)
};
UIBarButtonItem.Appearance.SetTitleTextAttributes(textAttributes, UIControlState.Normal);
}
I hit breakpoints when I use this code but nothing seems to change.
I don't see any way to make a custom renderer specifically for the toolbaritems or menuitems. Any tips are much appreciated.