If you want to zoom in without blurring, you need to change an attribute
UIImageView *imageView = [[UIImageView alloc] init];
CALayer *layer = imageView.layer;
layer.magnificationFilter = @"nearest";
Copy the code
The magnificationFilter attribute is explained below in the documentation
Among them
typedef NSString * CALayerContentsFilter NS_STRING_ENUM;
Copy the code
So the magnificationFilter is an NSString attribute whose value is given in the document as @”nearest” or @” Linear “.
layer.magnificationFilter = @"nearest";
Copy the code
The effect of setting this property