我正在绘制一个与颜色相乘的图案,但我还想调整图案图像的不透明度,最好的方法是什么?
这是我的图案绘制代码的样子:
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextSetBlendMode(context, kCGBlendModeMultiply);
[[UIImage imageNamed:@"background"] drawAsPatternInRect:self.bounds];
CGContextRestoreGState(context);