Search code examples
uitabbarios7uicolor

Set custom UITabBar font color under iOS7


It seems that [[UITabBar appearance] setSelectedImageTintColor:[UIColor redColor]]; is no longer working propertly under iOS7. I can set the background image, but the selected text is no longer getting the red color. I'm calling this from my application delegate. Has anyone tried to set the UITabBar font color and style under iOS7?


Solution

  • It is tintColor in iOS7, try the below:

    [[UITabBar appearance] setTintColor:[UIColor redColor]];
    

    Edit:

    To tint the non active buttons, put the below code in your VC's viewDidLoad:

    [self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:@"item_seleted.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"item_unselected.png"]];