TabbarController字体颜色修改方法

TabbarController字体颜色修改方法_第1张图片
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];

你可能感兴趣的:(TabbarController字体颜色修改方法)