UIImageView scaling/interpolation

前端 未结 4 1459
南旧
南旧 2021-01-02 01:55

I have a small IPhone app that I am working on and I am displaying an image with a UIImageView. I am scaling it up using the Aspect Fit mode. I would like to have the imag

4条回答
  •  遥遥无期
    2021-01-02 02:29

    You would need to set the magnificationFilter property on the view's layer to the nearest neighbour filter:

    [[view layer] setMagnificationFilter:kCAFilterNearest]
    

提交回复
热议问题