tabBar颜色修改

来源:互联网 发布:win10多核优化 2017 编辑:程序博客网 时间:2024/04/29 09:13
//未点击的颜色
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:                                                       [UIColor whiteColor], NSForegroundColorAttributeName,                                                       nil] forState:UIControlStateNormal];
//点击的颜色
    UIColor *titleHighlightedColor = [UIColor yellowColor];    [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:                                                       titleHighlightedColor, NSForegroundColorAttributeName,                                                       nil] forState:UIControlStateSelected];

0 0
原创粉丝点击