自定义UITabBar以及UITabBarItem
2019-07-10 本文已影响0人
精神薇
1.tabbar颜色
[[UITabBar appearance] setBarTintColor:[UIColor whiteColor]];
2.tabbaritem图片无渲染
item.selectedImage = [item.selectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
3.tabbaritem文字颜色
[[UITabBarItem appearance] setTitleTextAttributes:@{ NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];