UIImage ScaleToFit禁用抗锯齿? [英] UIImage ScaleToFit disable antialias?

查看:115
本文介绍了UIImage ScaleToFit禁用抗锯齿?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在uiimage中缩放图像时有没有办法禁用抗锯齿?谢谢

is there any way to disable antialiasing when scaling images in uiimage? thanks

推荐答案

将QuartzCore框架添加到项目中,然后设置图像视图的图层 magnificationFilter 属性为 kCAFilterNearest

Add the QuartzCore framework to your project, then set the image view’s layer’s magnificationFilter property to kCAFilterNearest.

这篇关于UIImage ScaleToFit禁用抗锯齿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆