【发布时间】:2011-07-03 10:30:24
【问题描述】:
当我使用静态数据时没有问题,但我使用 Web 服务的动态数据时出现问题(表格视图滚动导致程序崩溃)为什么?如果我评论这些行添加静态数据它可以工作;
//tempCs is NSDictionary
tempDc = [arrHaberler objectAtIndex:indexPath.row];
cell.textLabel.text = [tempDc valueForKey:@"short_header"];
NSData *imgData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:[tempDc valueForKey:@"iphone_src"]]];
UIImage *myImage = [[[UIImage alloc] initWithData:imgData] autorelease];
cell.imageView.image = myImage;
【问题讨论】:
标签: iphone objective-c memory-management uitableview