修改Tabbar字体颜色
2020-03-24 本文已影响0人
piggybear
iOS13之前
UITabBarItem *tabBarItem = [UITabBarItem appearance];
[tabBarItem setTitleTextAttributes:attributDicNor forState:UIControlStateNormal];
[tabBarItem setTitleTextAttributes:attributDicSelect forState:UIControlStateSelected];
iOS13之后
UITabBar *tabBar = [UITabBar appearance];
[tabBar setTintColor:selectColor];
[tabBar setUnselectedItemTintColor:unSelectColor];