I am performing a download through Download Manage class and updating a progress bar view according to the received bytes in the delegate connection didReceiveData.
Everything is working fine when I am on the page where downloading is happening but when I am going to some other view controller and coming back to my downloading page, the connection delegate functions are being called while transition of page but coming back does not upgrade the progress bar.
Thats my code
for (NSInteger row = 0; row < [downloadManager.downloads count]; row++)
{
if (download == downloadManager.downloads[row])
{
currentTime = [NSDate timeIntervalSinceReferenceDate];
[self updateProgressViewForIndexPath:[NSIndexPath indexPathForRow:row inSection:0] download:download];
lbl_percentage.text = [NSString stringWithFormat:@"%.02f%%",((double) download.progressContentLength / (double) download.expectedContentLength)*100];
lbl_received_data.text = [NSString stringWithFormat:@"%@ / %@",[self transformedValue:(double) download.progressContentLength],[self transformedValue:(double) download.expectedContentLength]];
double downloadSpeed = (double) download.progressContentLength / (currentTime - startTime);
lbl_speed.text = [NSString stringWithFormat:@"%@/sec", [self transformedValue:downloadSpeed]];
NSLog(@"Download Running");
break;
}
}