iosios7toolbaruiappearance

In iOS 7, how do i change the color of the "More" tab bar item?


I'm able to set finished selected and unselected images for all the other tabs, but not for the "More" item which is special.

screenshot

How can i do this?

Here is the current code:

[[UITabBar appearance] setTintColor:contrastColor];
[[UITabBarItem appearance] setTitleTextAttributes:@{UITextAttributeTextColor: contrastColor, UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0, 0)]} forState:UIControlStateSelected];
[[UITabBarItem appearance] setTitleTextAttributes:@{UITextAttributeTextColor: contrastColor, UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0, 0)]} forState:UIControlStateNormal];

contrastColor is white and delivered from our backend system.


Solution

  • I don't know if this is an option for you or not, but you can try find a "More" image similar to the one you are using instead of using Apple's, which I am assuming you are using; if not just ignore me.

    Then just do this:

    UITabBarItem *tabBarItem4 = [[tabViewController.tabBar items] objectAtIndex:3];
    [tabBarItem4 setFinishedSelectedImage:[UIImage imageNamed:@"tabbar-more-selected"] withFinishedUnselectedImage:[UIImage imageNamed:@"tabbar-more-normal"]];