iOS 去掉tabBar顶部线条
2017-12-06 本文已影响5人
夏天爱西瓜汁
有顶部的线的tabbar
//去掉tabBar顶部线条
CGRect rect = CGRectMake(0, 0, Screen_Width, Screen_Height);
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];