调整表格单元格iphone中的图像视图大小

时间:2009-10-16 22:14:03

标签: iphone xcode uitableview

我正在开发一个iPhone应用程序,从我的应用程序服务器下载高质量的图像。我需要将其大小调整为其大小的一半并将其显示在表格单元格中。任何人都可以帮我找到我可以使用的功能吗?

感谢您的建议!

1 个答案:

答案 0 :(得分:3)

UIImage *yourImage = [UIImage imageWithData:yourdata];
UIImageView *imageViewToPutInCell = [[UIImageView alloc] initWithImage:yourImage];
imageViewToPutInCell.frame = CGRectMake(0, 0, yourImage.size.width / 2, yourImage.size.height / 2);