// 第一种方式
//    [[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;

 

相关文章:

  • 2021-08-05
  • 2021-12-12
  • 2021-11-04
  • 2022-01-14
  • 2021-12-27
  • 2021-12-04
猜你喜欢
  • 2022-03-06
  • 2022-12-23
  • 2021-11-23
  • 2021-05-18
  • 2021-04-21
  • 2021-09-19
  • 2021-12-21
相关资源
相似解决方案