Search code examples
xcodeios5uitabbar

change color tabbar icons iOS 5


I am able to restyle the UITabBar with the following commands

[[UITabBar appearance] setSelectionIndicatorImage:
 [UIImage imageNamed:@"tab_select_indicator"]];
[[UITabBar appearance] setSelectedImageTintColor:[UIColor redColor]];

But how can I set the imageTintColor when the tab isn't selected. The default color is grey and I want to change this to blue.

Thanks


Solution

  • From the Apple docs UITabBar Class Reference:

    If you want to also customize the unselected image appearance, you must sent setFinishedSelectedImage:withFinishedUnselectedImage: to individual tab bar items.