在我的应用程序中,图像从表格单元格中的rss源加载。他们是不同的大小,我怎么能修复他们到一定的大小。我的代码是以固定大小显示图像
int blogEntryIndex1 = [indexPath indexAtPosition: [indexPath length] -1];
imgstring=[[blogEntries objectAtIndex: blogEntryIndex1] objectForKey: @"image"];
NSURL *url = [NSURL URLWithString:imgstring];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data];
cell.imageView.image=img;
您可以查看我的应用程序屏幕截图click here
感谢我将等待着你的回应....
你在该代码中的泄漏 cell.imageView.image = IMG; 应该是 cell.imageView.image = [img autorelease]; – 2010-07-05 06:53:15