我在CALayer上添加图像时遇到其他CALayer问题。我正在添加图像,但它的模糊和不清脆。有人可以帮我解决一下吗?这是我的代码。
CALayer *imageHolderLayer = [CALayer layer];
imageHolderLayer.contentsScale = [[UIScreen mainScreen] scale];
imageHolderLayer.contents = (id)self.feedImage.CGImage;
imageHolderLayer.frame = CGRectMake(20, 50, 88, 88);
imageHolderLayer.bounds = CGRectMake(20, 50, 88, 88);
imageHolderLayer.cornerRadius = 88/2;
imageHolderLayer.borderColor = [UIColor whiteColor].CGColor;
imageHolderLayer.borderWidth = 3.0;
[imageHolderLayer setMasksToBounds:YES];
imageHolderLayer.backgroundColor = [UIColor clearColor].CGColor;
imageHolderLayer.shouldRasterize = YES;
CGSize videoSize = [videoAsset naturalSize];
CALayer *parentLayer = [CALayer layer];
CALayer *videoLayer = [CALayer layer];
parentLayer.frame = CGRectMake(0, 0, videoSize.width, videoSize.height);
videoLayer.frame = CGRectMake(0, 0, videoSize.width,videoSize.height);
[parentLayer addSublayer:videoLayer];
[parentLayer addSublayer:shadowLayer];
[parentLayer addSublayer:logoLayer];
[parentLayer addSublayer:titleLayer];
[parentLayer addSublayer:imageHolderLayer];