1.把ViewController的edgesForExtendedLayout属性设置为UIRectEdgeAll
https://blog.csdn.net/mlcldh/article/details/53690976
2.底栏背景透明
tabbar.backgroundImage = [self imageWithColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:0]]; - (UIImage *)imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f,0.0f, 1.0f,1.0f); UIGraphicsBeginImageContext(rect.size); CGContextRef context =UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context, [color CGColor]); CGContextFillRect(context, rect); UIImage *image =UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; }