UITabBar文字设置颜色
UITabBarItem *item = [UITabBarItem appearance];
[item setTitleTextAttributes:@{
NSFontAttributeName: [UIFont systemFontOfSize:14],
NSForegroundColorAttributeName: [UIColor grayColor]
} forState:UIControlStateNormal];
[item setTitleTextAttributes:@{
NSForegroundColorAttributeName: [UIColor redColor]
} forState:UIControlStateSelected];
self.tabBar.tintColor = UIColor.redColor;
网友评论