UITabbar的常用属性

//    //设置tabbar的背景颜色
//   [self.tabBar setBarTintColor:[UIColor redColor]];
//    //设置选中时图片和文字的颜色
//    [self.tabBar setTintColor:[UIColor orangeColor]];
//    //取消tabbar的半透明效果
//    self.tabBar.translucent = false;
    //设置文本属性
//    [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
//                                                       [UIColor redColor], NSForegroundColorAttributeName,
//                                                       nil] forState:UIControlStateSelected];

自定义选中时的图片

//    viewcontroller.tabBarItem.selectedImage =  [viewcontroller.tabBarItem.selectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

//设置选中时的背景图片.

 self.tabBar.selectionIndicatorImage = [selImg resizedImgWithSize:CGSizeMake(w, h)];


原文地址:https://www.cnblogs.com/cnman/p/4966688.html