本文介绍了iOS:调整UIImage大小的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想调整UIImage的大小,然后尝试以下代码:
I wanto to resize an UIImage and I try this code:
UIImage *newImage = [image1toResize _imageScaledToSize:CGSizeMake(290, 390) interpolationQuality:1];
但是我有这个警告:警告:"UIImage"可能不响应"-_imageScaledToSize:"
but I have this warning:warning: 'UIImage' may not respond to '-_imageScaledToSize:'
为什么?
推荐答案
_imageScaledToSize不是UIImage函数.如果此功能是您正在使用的3rd Party库的一部分,则需要确保在文件中#import正确的标题.
_imageScaledToSize is not a UIImage function. If this function is part of a 3rd Party library you are using then you need to make sure that you #import the right headers in your file.
这篇关于iOS:调整UIImage大小的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!