利用UI_APPEARANCE统一设置UITabBarItem样式
-(void)setupTabBarItemAttributes{ //attributes NSMutableDictionary *selectedAttrs= [NSMutableDictionary dictionary]; selectedAttrs[NSFontAttributeName] = [UIFont systemFontOfSize:10];//label字体大小 selectedAttrs[NSForegroundColorAttributeName] = [UIColor orangeColor];//选中字体颜色 NSMutableDictionary *attrs= [NSMutableDictionary dictionary]; attrs[NSFontAttributeName] = selectedAttrs[NSFontAttributeName]; attrs[NSForegroundColorAttributeName] = [UIColor lightGrayColor];//未选中字体颜色 UITabBarItem *item=[UITabBarItem appearance]; [item setTitleTextAttributes:attrs forState:UIControlStateNormal]; [item setTitleTextAttributes:selectedAttrs forState:UIControlStateSelected]; }