隐藏系统tabbar上的黑色线条,亲测管用
1 CGRect rect = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); 2 UIGraphicsBeginImageContext(rect.size); 3 CGContextRef context = UIGraphicsGetCurrentContext(); 4 CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]); 5 CGContextFillRect(context, rect); 6 UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); 7 UIGraphicsEndImageContext(); 8 [self.tabBar setBackgroundImage:img]; 9 [self.tabBar setShadowImage:img];