在我的應用程序中,圖像從表格單元格中的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