Is there a document way to create thumbnail from U

2020-08-04 04:40发布

问题:

I hope to create thumbnail from an UIImage/UIImageView. There are some undocument solution: http://ofcodeandmen.poltras.com/2008/10/30/undocumented-uiimage-resizing/ ..

I wonder if there is a documented way to create thumbnail from UIImage/UIImageView?

Thanks

interdev

回答1:

I use the drawInRect method on the UIImage. I was looking into where I got this approach from and it turns out I originally found it in Apples LazyTableImages example.

From the documentation: Draws the entire image in the specified rectangle, scaling it as needed to fit



标签: iphone