Search code examples
iosobjective-cuitabbaritemuiappearancetintcolor

Changing UITabBarItem's Tint Color in iOS 9?


I can't seem to change the tint color for UITabBarItem's in iOS 9. I'm using objective-c and have tried using titleTextAttributes programmatically, and runtime attributes in storyboard as well. I've read through the documentation, but can't seem to figure this out. In fact I've even created a separate selectedState image, but again, it still tints it system blue.


Solution

  • You can use the appearance proxy like this:

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

    This is working for me on iOS8 and iOS9. I have it in my app delegate - but you can put it in a base class if you like.