How can I change the text and icon colors for UITabBar and UITabBarItems in iOS 7? The default gray text seems dim and hard to read for unselected tabbar items.
Tested in iOS 8 for permanent text color (selected/unselected) and image colors (selected/unselected) without create two images with different colors foreach tab:
Text color:
[[UITabBar appearance] setTintColor: selectedTabColor ];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
**yourFont**, NSFontAttributeName,
** selectedTabColor**, NSForegroundColorAttributeName,
nil] forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
**yourFont**, NSFontAttributeName,
**selectedTabColor**, NSForegroundColorAttributeName,
nil] forState:UIControlStateSelected];
Images color: (assuming that the original images have the color you want display as unselected)
In a UITabBarController subclass -awakeFromNib :
for (int i =0; i
Credits: the whole internet and stack overflow XD