使用tabbar 会使控件顶部有一条黑色细线
CGRect rect = CGRectMake(0, 0, SCREENWIDTH, SCREENHEIGHT);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
CGContextFillRect(context, rect);
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.tabBar setBackgroundImage:img];
[self.tabBar setShadowImage:img];
使用该方式让其透明
效果如下