TabBar背景颜色设置

// 第一种方式
//    [[UITabBar appearance] setBarTintColor:[UIColor blackColor]];
//    [UITabBar appearance].translucent = NO;
    // 第二种方式
    UIView *view = [[UIView alloc]init];
    view.backgroundColor = [UIColor redColor];
    view.frame = self.tabBar.bounds;
    [[UITabBar appearance] insertSubview:view atIndex:0];
    
//    //还有第三种方法就是使用背景图片:
//    [[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"tabBarBackgroundImage"]];
//    [UITabBar appearance].translucent = NO;
原文地址:https://www.cnblogs.com/dujiahong/p/8732527.html