1

我有一个纹理,我为我的视图控制器视图添加了一个单独的图层,如下所示。该层不是不透明的。我想将混合模式设置为textureLayerkCGBlendModeMultiply 之类的东西。我该怎么做?

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];
4

0 回答 0