I want to change the badge text color and font of my tab bar item using setBadgeTextAttributes in my tabBarViewController. So I use my code:
for (UITabBarItem *tabBarItem in self.tabBar.items){
[tabBarItem setBadgeColor:[UIColor redColor];
[tabBarItem setBadgeTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName:@"Helvetica-Bold" size:26.0], NSFontAttributeName,
[UIColor greenColor], NSForegroundColorAttributeName,
nil] forState:UIControlStateNormal];
}
But it only change the badge text color, but not the font. How can I fix it?
Please and thanks~