I am trying to update a each table cell with progress bar loading, but I am stuck. I created a custom cell for a table view with these properties:
@interface
You should keep the value of (double)totalBytesWritten / (double)totalBytesExpectedToWrite in OFPVideoDetails (add one property "progress" in OFPVideoDetails).
Then reload the cell in - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten
totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite: (int64_t)totalBytesExpectedToWrite
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
OFPTableCell *cell = [self.tableViewCache dequeueReusableCellWithIdentifier:@"Cell"];
OFPVideoDetails *vd = [someArray objectAtIndex:indexPath.row];
cell.textLabel.text=vd1;
cell.detailTextLabel.text=vd2;
CGSize size = {65,53};
cell.imageView.image =[self imageWithImage:[UIImage imageWithContentsOfFile:vd.imageUrl] scaledToSize:size];
cell.progressView.progress = vd.progress;
cell.delegate = self;
return cell;
}