美文网首页iOS开发
TabbarController字体颜色修改方法

TabbarController字体颜色修改方法

作者: iOS技术小卒 | 来源:发表于2017-04-27 20:25 被阅读9次
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字体颜色修改方法

    本文链接:https://www.haomeiwen.com/subject/kdpnzttx.html