修改tabarItem的点击状态下文字、图片的颜色
1、设置 tabbarItem 选中状态时的图片(不会被系统默认渲染为蓝色,显示图像原始颜色)
// 设置 tabbarItem 选中状态时的图片(不会被系统默认渲染为蓝色,显示图像原始颜色)
UIImage *img = [UIImage imageNamed:@"icon_mine"];
// 始终绘制图片原始状态,不使用Tint Color。
img = [img imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[[_myselfView.tabBarItem setSelectedImage:img];
2、修改tabarItem的文字标题不同状态下的不同字体、大小、颜色
//修改tabarItem的文字标题点击状态下的不同字体、大小、颜色
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:LRYCOLOR(0xFF7C08),NSForegroundColorAttributeName, [UIFont fontWithName:@"Helvetica"size:12.0f],NSFontAttributeName,nil]forState:UIControlStateSelected];
3、设置着色(Tint Color)颜色进行渲染,可同时修改tabarItem的点击状态下文字、图片的颜色
[_tabBarController.tabBar setTintColor:COLOR(0xFF7C08)];