首页 > 其他 > 详细

设置tabbar上面文字的颜色

时间:2016-05-13 07:53:17      阅读:242      评论:0      收藏:0      [点我收藏+]

 //设置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];

设置tabbar上面文字的颜色

原文:http://www.cnblogs.com/xiaolingling1126/p/5485082.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!