Tab bar item tint color

旧街凉风 提交于 2019-12-06 02:25:53

问题


In iOS 7, I been developing an app that uses the UITabBarController and I noticed that the tab bar items stay gray even tho I change the tint color of the tab bar. Is there any way to change the color of non-selected tab bar items?


回答1:


To do this:: follow a simple approach..

  1. Change tintColor as you want

  2. Add a new set of images for unselected items and render them in original mode.

For more info, read through this link




回答2:


To sets the tint color globally for the app, you need to add below code In app delegate didFinishLaunchingWithOptions: method:

[[UITabBar appearance] setTintColor:[UIColor colorWithRed:13.0/255.0 green:116.0/255.0 blue:128.0/255.0 alpha:1.0]];


来源:https://stackoverflow.com/questions/21361101/tab-bar-item-tint-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!