with more appearance control in iOS 5, how do we change the UITabBarItem text color ? from default white to other color ?
EDIT:working solution
[[UITabBarItem appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor blackColor], UITextAttributeTextColor,
[UIColor whiteColor], UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont,
nil]
forState:UIControlStateNormal];
Do you mean this one? Keep in mind, this only works for iOS5.0 or later.
Apple’s documentation on customizing appearance:
Edit:
Here is another example using the UIAppearance system and the NSDictionary literal syntax:
Edit (by @JeremyWiebe):
As of iOS 6, the dictionary keys have been changed to be the same as OS X uses: