问题

is there any way to disable antialiasing when scaling images in uiimage? thanks
回答1:
Add the QuartzCore framework to your project, then set the image view’s layer
’s magnificationFilter
property to kCAFilterNearest
.
回答2:
I was working with SpriteKit in Xcode 11 (Swift 5) and also got this problem. To solve it (i.e. disable anti-aliasing) i did the following:
texture?.filteringMode = SKTextureFilteringMode.nearest
来源:https://stackoverflow.com/questions/6092167/uiimage-scaletofit-disable-antialias