Search code examples
iosuitabbarcontrollertint

All UITabBarItem icons are tinted when app starts


I have a UITabBarController with 3 items, and when the app starts, all the items' icon appear tinted, instead of having one tinted and the other two greyed out:

enter image description here

After I navigate through the tabs, they start to behave correctly. Why is this happening?


Solution

  • Add this line into your App Delegate

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

    enter image description here enter image description here