I'm trying to load images from server to cell asynchronously. But images not changing while scrolling, only after scrolling stops. "loaded" messages appear in console only after scrolling stops too. I want images appear in cell while scrolling.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
CustomCell *cell = (CustomCell *)[_tableView dequeueReusableCellWithIdentifier:@"CustomCell"];
ZTVRequest *request = [[ZTVRequest alloc] init];
[request getSmallImg completionHandler:^(UIImage *img, NSError *error) {
if (! error) {
NSLog(@"loaded")
cell.coverImgView.image = img;
}
}];
return cell;
}