设置tabbar上面文字的颜色

 //设置tabbar 选中文字的颜色

    [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],

                                                        NSForegroundColorAttributeName : [UIColor colorWithRed:63/255.0 green:178/255.0 blue:227/255.0 alpha:1]

                                                        } forState:UIControlStateSelected];

    //设置tabbar  未选中文字的颜色

    [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],

                                                        NSForegroundColorAttributeName : [UIColor colorWithRed:145/255.0 green:158/255.0 blue:180/255.0 alpha:1]

                                                        } forState:UIControlStateNormal];

posted @ 2016-05-12 11:45  xiaolingling  阅读(1295)  评论(0编辑  收藏  举报