IOS 8, Xcode 6 tint hue

When I select t UIColor for the UIImage hue in the UITabBar properties, nothing changes, only the blue color is displayed by default. I need to call

 [[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:255.0/255.0 green:150.0/255.0 blue:10.0/255.0 alpha:1.0]]; 

but it is not called when the application starts, so the icon is initially blue and changes color a second time (even if put in viewWillAppear ).

I use UIStoryboard as a startup screen file, which has a UITabBarController inside.

Any ideas? Was hue selection in xcode 6 working through UIInterfaceBuilder ?

thanks

+6
source share
2 answers

This is mistake.

you can solve this problem by using the "Runtime Custom Attributes Attributes" to change tabBar.tintColor (for> = iOS7) or tabBar.selectedImageTintColor (for all but pressed in iOS 8).

Do not use Attributes Inspector. (This does not work)

enter image description here

+24
source

In your outer call, use setTintColor instead of setSelectedImageTintColor .

0
source

Source: https://habr.com/ru/post/976150/


All Articles