tabbaritem的字体颜色设置

 // 设置文字的样式

    NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];

    textAttrs[NSForegroundColorAttributeName] = [UIColor colorWithRed:0.859 green:0.867 blue:0.192 alpha:1.000];

    NSMutableDictionary *selectTextAttrs = [NSMutableDictionary dictionary];

    selectTextAttrs[NSForegroundColorAttributeName] = [UIColor colorWithRed:0.839 green:0.824 blue:0.282 alpha:1.000];

    [[UITabBarItem appearance] setTitleTextAttributes:textAttrs forState:UIControlStateNormal];

    [[UITabBarItem appearance] setTitleTextAttributes:selectTextAttrs forState:UIControlStateSelected];

 

用到这个UITabBarItem appearance

你可能感兴趣的:(字体,tabBarItem)