Any quick and dirty anti-aliasing techniques for a

2019-01-03 12:44发布

I've got a UIImageView (full frame and rectangular) that i'm rotating with a CGAffineTransform. The UIImage of the UIImageView fills the entire frame. When the image is rotated and drawn the edges appear noticeably jagged. Is there anything I can do to make it look better? It's clearly not being anti-aliased with the background.

8条回答
戒情不戒烟
2楼-- · 2019-01-03 13:35

just add "Renders with edge antialiasing" with YES in plist and it will work.

查看更多
smile是对你的礼貌
3楼-- · 2019-01-03 13:43

I would totally recommend the following library.

http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/

It contains lots of useful extensions to UIImage that solve this problem and also include code for generating thumbnails etc.

Enjoy!

查看更多
登录 后发表回答