TabbarController字体颜色修改方法
2017-04-27 本文已影响9人
iOS技术小卒
tabbar
//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];