Created
July 5, 2021 11:39
-
-
Save HeikkiDev/fe028f1d969f5d2ed80f1fff6b13501c to your computer and use it in GitHub Desktop.
Modify TabBar on iOS TabbedRenderer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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