문제

UIImageView *assetImageView = [[UIImageView alloc] initWithFrame:viewFrames];
[assetImageView setContentMode:UIViewContentModeScaleToFill];
[assetImageView setImage:[UIImage imageWithCGImage:[self.asset thumbnail]]];
[self addSubview:assetImageView];

This code generate a blurry image because of the reduction in quality and I found that I need to use this

CGContextSetInterpolationQuality(context, kCGInterpolationHigh);

But how do i apply this code in my case?

도움이 되었습니까?

해결책

I'd recommend reading this article. Use the code there to resize the image to the right size before passing it to UIImageView.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top