I have this code in my AppDelegate.m file under didFinishLaunchingWithOptions:
so that I can have a custom font.
[[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor grayColor], UITextAttributeTextColor,
[UIFont fontWithName:@"Gotham-Medium" size:10], UITextAttributeFont, nil] forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], UITextAttributeTextColor,
[UIFont fontWithName:@"Gotham-Medium" size:10], UITextAttributeFont, nil] forState:UIControlStateHighlighted];
The font change works as expected, but I get this output in the Debug console:
button text attributes only respected for UIControlStateNormal, UIControlStateHighlighted and UIControlStateDisabled. state = 1 is interpreted as UIControlStateHighlighted.