有没有一种文档方法可以从UIImage/UIImageView创建缩略图? [英] Is there a document way to create thumbnail from UIImage/UIImageView?
问题描述
我希望从UIImage/UIImageView创建缩略图. 有一些无文档的解决方案: http://ofcodeandmen.poltras.com/2008/10/30/undocumented-uiimage-resize/ ..
I hope to create thumbnail from an UIImage/UIImageView. There are some undocument solution: http://ofcodeandmen.poltras.com/2008/10/30/undocumented-uiimage-resizing/ ..
我想知道是否有记录的方法可以从UIImage/UIImageView创建缩略图?
I wonder if there is a documented way to create thumbnail from UIImage/UIImageView?
谢谢
interdev
推荐答案
我在UIImage
上使用drawInRect
方法.
我一直在研究从何处获得这种方法,结果原来我是在Apples LazyTableImages 示例中找到它的.
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.
从文档中: 在指定的矩形中绘制整个图像,并根据需要缩放以适应
这篇关于有没有一种文档方法可以从UIImage/UIImageView创建缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!