在我的应用程序中,我需要更换一种颜色,我使用颜色选择器来做它。对于一件红色衬衫,我需要应用颜色,它不完全正常工作,并出现深色阴影。我们可以改变红色的色调与拾取器颜色兼容?这是我的代码
imageLayer = [CALayer layer];
NSLog(@"imageLayer %@",imageLayer);
NSLog(@"self.layer %@",self.layer);
imageLayer.frame = CGRectMake(0, 0, 660, 1000);
imageLayer.cornerRadius = 10.0;
imageLayer.backgroundColor = [UIColor clearColor].CGColor;
//imageLayer.contents = (id) [UIImage imageNamed:@"3.png"].CGImage;
imageLayer.masksToBounds = YES;
[self.layer addSublayer:imageLayer];
subLayer = [CALayer layer];
subLayer.frame = CGRectMake(0, 0, 660, 1000);
subLayer.cornerRadius = 10.0;
subLayer.backgroundColor = [UIColor clearColor].CGColor;
subLayer.contents = (id) [UIImage imageNamed:@"1.png"].CGImage;
[imageLayer addSublayer:subLayer];