I'd recommend reading this article. Use the code there to resize the image to the right size before passing it to UIImageView.
Blurry images after using setContentMode with UIViewContentModeScaleToFill
-
29-11-2021 - |
Domanda
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?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow