我创建了一个包含高分辨率图像的UIImageView。问题是该图像的分辨率太高而无法放入imageView。 imageView的大小是92 x 91(所以它很小)。它包含一个UIImage,它的分辨率太高,所以在UIImageView中看起来很丑。 那么我该如何降低UIImage的分辨率呢?降低分辨率UIImage/UIImageView
我的UIImageView的代码:
UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:pngFilePath]];
myImageView.frame = CGRectMake(212.0, 27, 92,91);
您对分辨率的定义是什么?它通常用作每个单元的像素数。这听起来像你把它定义为图像的尺寸。 –