ios---设置UITabBarController的字体颜色和大小

+(void)load{
    NSMutableDictionary *attr3=[NSMutableDictionary dictionary];
    attr3[NSForegroundColorAttributeName]=[UIColor blackColor];
    attr3[NSFontAttributeName]=[UIFont systemFontOfSize:14];
    [[UITabBarItem appearance]setTitleTextAttributes:attr3 forState:UIControlStateNormal];
    
    NSMutableDictionary *attr4=[NSMutableDictionary dictionary];
    attr4[NSForegroundColorAttributeName]=[UIColor redColor];
    attr4[NSFontAttributeName]=[UIFont systemFontOfSize:14];
    [[UITabBarItem appearance]setTitleTextAttributes:attr4 forState:UIControlStateSelected];

}
posted @ 2017-08-31 19:43  技术-刘腾飞  阅读(2026)  评论(0编辑  收藏  举报