CGRect rect = CGRectMake(0.0f, 0.0f, self.view.bounds.size.width, 0.5);
UIGraphicsBeginImageContextWithOptions(rect.size,NO, 0);
CGContextRef context =UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor colorWithHexString:@"#E7E7E7"].CGColor);
CGContextFillRect(context, rect);
UIImage *image =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.tabBar setShadowImage:image];
[self.tabBar setBackgroundImage:[UIImage new]];
UITabBar修改顶部线条颜色
最新推荐文章于 2019-10-14 17:06:47 发布