- (void)viewDidLoad {[super viewDidLoad];// 去掉顶部的黑线self.tabBar.backgroundImage = [UIImage imageWithColor:[UIColor clearColor]];[self.tabBar setShadowImage:[UIImage imageWithColor:[UIColor clearColor] size:CGSizeMake(kScreenWidth, 0.5)]];
转:https://www.cnblogs.com/tufei7/p/10917290.html