I am trying to loading images in tableViewCell asynchronously.
When I move the table up and down then images appear otherwise not.
AsyncImageView contains NSUrlConnection. It doesn’t go inside the delegate “connectionDidFinishLoading”. but when I move the table up or down then it goes inside this delegate function
Below is the code
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];
First load all images and add them some data structure like array and after that show it to the table. Don’t overlap your UI with network calls.