//tabbar正常状态的颜色
[[UITabBarItem appearance]setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor colorWithRed:41/255.0 green:160/255.0 blue:42/255.0 alpha:1],NSForegroundColorAttributeName, nil] forState:UIControlStateNormal];
//tabbar点击选择后的颜色
[[UITabBarItem appearance]setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor orangeColor],NSForegroundColorAttributeName, nil] forState:UIControlStateSelected];
网友评论