开发者

Is it possible to resize images to specific size?

开发者 https://www.devze.com 2023-01-22 05:14 出处:网络
I have an application which has around开发者_开发技巧 800 images. Is there any way to re size the images to specific size. I have tried using the following code:

I have an application which has around开发者_开发技巧 800 images. Is there any way to re size the images to specific size. I have tried using the following code:

UIImage *image = [[UIImage imageNamed:recipeObj.recipeImage]
    _imageScaledToSize:CGSizeMake(64.0f, 61.0f)
 interpolationQuality:1];
cell.imageView.image = image;

This code snippet gives me a warning. Is there any other alternative way for resizing images?


You could look at this blog post :

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

At the end he's attached the resizing code as a category on UIImage.

0

精彩评论

暂无评论...
验证码 换一张
取 消