I have an app with a four-tabbed UITabBarController. I've been trying to customize different badge (background) colors across the various tabs, but haven't been able to achieve a unique customization per tab.
What I'm trying to accomplish:
- Open up the app, 2nd tab is selected by default
- Notification comes in for the 3rd tab, render a badge on the 3rd tab and show the badgeBackgroundColor as blue
- The whole time, any badges on the other tab should stay red
It seems like the tab bar will only look at the standardAppearance for the tabBarItem in the currently selected tab, e.g. if i set the badgeBackgroundColor for tab 3 to blue, the badges across the whole TabBar turn blue when i select the tab. Then when i switch to any other tab, the badges across all TabBar items take on the badgeBackgroundColor from the newly selected tab.
I also tried to use tabBarItem.badgeColor but this seemed to have no effect at all.
Will the standardAppearance of a tabItem always impact all the other tabs? Is there a way to uniquely customize the badgeBackgroundColor of each tabItem across the app?