我正在尝试异步加载 tableViewCell 中的图像。当我上下移动桌子时,图像会出现,否则不会。
AsyncImageView 包含 NSUrlConnection。它不会进入委托“connectionDidFinishLoading”。但是当我向上或向下移动桌子时,它会进入这个委托函数
下面是代码
CGRect frame;
frame.size.width=115; frame.size.height=100;
frame.origin.x=0; frame.origin.y=0;
AsyncImageView* asyncImage = [[[AsyncImageView alloc]
initWithFrame:frame] autorelease];
loadingTable=[[UIActivityIndicatorView alloc] initWithFrame:frame];
[cell.contentView addSubview:loadingTable];
[loadingTable startAnimating];
asyncImage.tag = 999;
NSURL* url = [NSURL URLWithString:[[videoCollection objectAtIndex:indexPath.row] videoImageUrl] ];
[asyncImage loadImageFromURL:url activity:loadingTable];
[cell.contentView addSubview:asyncImage];