我在标签栏中有四个项目。
1> 观看。(黑色)
2> 按需。(黑色)
3> 搜索。(黑色)
4> 设置。(我的颜色)
如何更改标签栏中项目文本的颜色以匹配其图标颜色。(现在在标签栏中选择了性能)
在此处输入图像描述
如何更改标签栏中“1,2,3”文本的颜色以匹配其图标颜色。(现在在标签栏中选择了性能)
我试图设置 TitleTextAttributes。
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor(red: 255.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: 1.0),NSFontAttributeName: UIFont(name: "SFUIDisplay-Regular", size: 36.0)!], forState:UIControlState.Normal)
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor(red: 22.0/255.0, green: 209.0/255.0, blue: 237.0/255.0, alpha: 1.0),NSFontAttributeName: UIFont(name: "SFUIDisplay-Regular", size: 36.0)!], forState:UIControlState.Focused)
但我想喜欢它。
这个问题出现在 tvos 9.1 中。