iOS searchbar的背景颜色怎么改成透明。
//搜索条的背景色 self.search.backgroundImage = [self imageWithColor:[UIColor colorWithRed:237/255.0 green:237/255.0 blue:237/255.0 alpha:0] size:_search.bounds.size]; - (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; }
如对本文有疑问, 点击进行留言回复!!
IOS系统中使用new Date()报错valid Date
解决Android10读取不到/sdcard/、/storage/emulated/0/文件的问题
Codeforces Round #649 (Div. 2)-B. Most socially-distanced subsequence(思维)
网友评论