Skip to content

Instantly share code, notes, and snippets.

@HeikkiDev
Created July 5, 2021 11:39
Show Gist options
  • Select an option

  • Save HeikkiDev/fe028f1d969f5d2ed80f1fff6b13501c to your computer and use it in GitHub Desktop.

Select an option

Save HeikkiDev/fe028f1d969f5d2ed80f1fff6b13501c to your computer and use it in GitHub Desktop.
Modify TabBar on iOS TabbedRenderer
public override void ViewWillAppear(bool animated)
{
if (TabBar.Items == null)
{
return;
}
foreach (UITabBarItem tabItem in TabBar.Items)
{
UpdateTabBarItemAppearance(tabItem);
}
base.ViewWillAppear(animated);
}
private static void UpdateTabBarItemAppearance(UITabBarItem item)
{
if (item == null)
{
return;
}
item.SetTitleTextAttributes(new UITextAttributes() { Font = UIFont.FromName("RobotoCondensed-Bold", 14), }, UIControlState.Selected);
item.SetTitleTextAttributes(new UITextAttributes() { Font = UIFont.FromName("RobotoCondensed-Regular", 14) }, UIControlState.Normal);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment