//设置tabbar 选中文字的颜色
[[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],
NSForegroundColorAttributeName : [UIColor colorWithRed:63/255.0 green:178/255.0 blue:227/255.0 alpha:1]
} forState:UIControlStateSelected];
//设置tabbar 未选中文字的颜色
[[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],
NSForegroundColorAttributeName : [UIColor colorWithRed:145/255.0 green:158/255.0 blue:180/255.0 alpha:1]
} forState:UIControlStateNormal];
时间: 2024-10-09 23:50:44