我有一个纹理,我将其添加为我的viewcontroller视图的单独图层,如下所示。该层不是不透明的。我想将textureLayer
的混合模式设置为kCGBlendModeMultiply。我该怎么办?
UIColor* textureBackground = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Texture.png"]];
CALayer* textureLayer = [[CALayer alloc] init];
[textureLayer setFrame:self.view.bounds];
[textureLayer setBackgroundColor:textureBackground.CGColor];
[textureLayer setOpacity:0.5];
[self.view.layer insertSublayer:textureLayer above:self.view.layer];