What I ended up doing : I created a custom UITabBarItem class.
@interface MyTabBarItem : UITabBarItem
- (void)setColor:(UIColor *)color forState:(UIControlState)state;
@end
And it's implementation :
- (void)setColor:(UIColor *)color forState:(UIControlState)state {
NSMutableDictionary *attributes = [[self titleTextAttributesForState:state] mutableCopy];
if (!attributes) {
attributes = [NSMutableDictionary dictionaryWithCapacity:1];
}
attributes[NSForegroundColorAttributeName] = color;
[self setTitleTextAttributes:attributes forState:state];
UIImage *image = [[self tintImage:self.image WithColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
if (state == UIControlStateSelected) {
self.selectedImage = image;
} else {
self.image = image;
}
}
- (UIImage *)tintImage:(UIImage *)image WithColor:(UIColor *)tintColor {
UIGraphicsBeginImageContextWithOptions(image.size, NO, [[UIScreen mainScreen] scale]);
CGRect drawRect = CGRectMake(0, 0, image.size.width, image.size.height);
[image drawInRect:drawRect];
[tintColor set];
UIRectFillUsingBlendMode(drawRect, kCGBlendModeSourceAtop);
UIImage *tintedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return tintedImage;
}
So, each button can be set up independently. Each of you button is setUp with setColor:forState:UIControlStateNormal and setColor:forState:UIControlStateSelected
And voilà! (Works for iOS 7 min)