Luda Luda - 2 months ago 12
iOS Question

UITabBar tintColor is not changed storyboard

I have set a global tintColor, and I can see it in the interface builder, when I select UITabBar as well as UITabBarController, still when I run the application, the tint of the selected UITabBarItem is iOS default (blue), and not what I have set. What am I missing?

P.S.
UITabBarController is pushed to navigationController, it is not the rootViewController

Answer

Use this code in didFinishLaunchingWithOptions: method of your appDelegate

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

Replace red color with color you want.