//oc
[[UITabBar appearance]setBackgroundImage:[[UIImage alloc]init]];
[[UITabBar appearance]setBackgroundColor:[UIColor colorWithRed:128/255.0 green:68/255.0 blue:188/255.0 alpha:0.3]];
// // 第二种方式
// UIView *view = [[UIView alloc]init];
// view.backgroundColor = [UIColor colorWithRed:128/255.0 green:68/255.0 blue:188/255.0 alpha:1];
// view.frame = self.tabBar.bounds;
// [[UITabBar appearance] insertSubview:view atIndex:0];
tabbar背景颜色
最新推荐文章于 2023-06-13 20:50:07 发布