android短视频开发,取消searchBar 背景颜色设置
android短视频开发,取消searchBar 背景颜色设置
_searchBar.backgroundColor = [UIColor clearColor];
_searchBar.backgroundImage = [self imageWithColor:[UIColor clearColor] size:_searchBar.bounds.size];
//取消searchbar背景色
- (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size
{
CGRect rect = CGRectMake(0, 0, size.width, size.height);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
以上就是 android短视频开发,取消searchBar 背景颜色设置,更多内容欢迎关注之后的文章