在7.1更新后,该行似乎无法正常工作:
NSDictionary *tabBarTitleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor colorWithRed:0.059 green:0.737 blue:0.596 alpha:1.0], NSForegroundColorAttributeName, nil];
[[UITabBarItem appearance] setTitleTextAttributes:tabBarTitleTextAttributes forState:UIControlStateSelected];
答案 0 :(得分:0)
它对我有用。
[[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor redColor]} forState:UIControlStateSelected];
我的设置