Here is what I am doing in my AppDelegate
self.tabBarController.delegate = self;
NSDictionary *unSelectedAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[Utility primaryColor], NSForegroundColorAttributeName, nil];
NSDictionary *selectedAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName, nil];
[[UITabBarItem appearance] setTitleTextAttributes:unSelectedAttributes
forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:selectedAttributes
forState:UIControlStateSelected];
and here is my firstViewController :
[[UINavigationBar appearance] setBarTintColor:[Utility primaryColor]];
[[UITabBar appearance] setTintColor:[UIColor whiteColor]];
UITabBar * tabBar = self.tabBarController.tabBar;
UIImage *tabImage = [UIHelper makeImageWithSizeAndColor:[Utility primaryColor] : CGSizeMake(tabBar.frame.size.width/2, tabBar.frame.size.height)];
tabImage = [tabImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
tabBar.selectionIndicatorImage = [UIHelper makeImageWithSizeAndColor:[Utility primaryColor] : CGSizeMake(tabBar.frame.size.width/tabBar.items.count, tabBar.frame.size.height)];
my tabs are changing color but the text remains white and gray. It's not changing color as per setTitleTextAttributes
.