Im currently using Xcode 5 to develop a list oriented app. I have a custom tint for the tab bar, custom images for the tab icons, custom tint for the tab bar's icon images when its selected, but i cannot find how to customize the icon images' tint for when its not selected. Right now its just the default gray which you can barely see in contrast to my green tab bar. I want to make the tab bar icons' images and names white.
Does anybody know how to set the tab bar icons' image tint in Xcode 5?
Setting Custom Tabbar with selected and non-seleted Image. Also having tabbarItem Image Insets position in center
**In viewWillAppear method of first viewcontroller. **
You can do this purely from the storyboard without writing any code by adding a "User Defined Runtime Attribute":
You need to set the rendering mode for each tab's (unselected) image to
UIImageRenderingModeAlwaysOriginal
. So, in your app delegate, get a reference to the tab bar and then iterate over each tab bar item, adjusting the image modes.There's probably a better way to get a reference to the tab bar, but I did the following:
Then the image adjustment can be done as follows:
If you have your tab bar in visual editor, you can do it here. Select tab bar and in "User Defined Runtime Attributes" add attribute: Key Path: selectedImageTintColor Type: Color Value:
You can try this to tint selected icon :
and this to tint the non active icon :
Try this way..it worked for me
In app delegate
run and go