Open sa124a opened 2 years ago
网上的方法不适用
//移除顶部线条 self.tabBar.backgroundImage = [UIImage new]; self.tabBar.shadowImage = [UIImage new];
//添加阴影 self.tabBar.layer.shadowColor = [UIColor lightGrayColor].CGColor; self.tabBar.layer.shadowOffset = CGSizeMake(0, -5); self.tabBar.layer.shadowOpacity = 0.3;
iOS15是用 UITabBarAppearance().shadowImage 吧?
网上的方法不适用
//移除顶部线条 self.tabBar.backgroundImage = [UIImage new]; self.tabBar.shadowImage = [UIImage new];