【发布时间】:2016-03-22 14:57:05
【问题描述】:
我想更改tabBar 中的项目颜色,而不是文本未选择的项目等长期目标搜索它,我没有找到。我刚找到这段代码,它不会改变项目或图像颜色,只是文本。
默认颜色是灰色,我想改一下。
这是我找到的代码:
UITabBar.appearance().barTintColor = UIColor(redRGB: 93, greenRGB: 175, blueRGB: 228)
UITabBar.appearance().tintColor = UIColor .redColor()
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.whiteColor()], forState:.Normal)
【问题讨论】: