tabBar颜色改动

//未点击的颜色
[[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];

posted @ 2017-05-17 10:02  mfmdaoyou  阅读(141)  评论(0编辑  收藏  举报