So, I created a singleton class for my ASIHTTPRequest and a network queue. It downloads the file in the background with no problem. However, because I'm initiating the download from one view, and then the user has the option to change tabs to view a download queue. WHen I switch to the tab the progress bar is not updating. I'm not sure how to get a progress bar in another view controller to update.
if (!self.queue) {
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
self.queue = [[[ASINetworkQueue alloc] init] autorelease];
[self.queue setMaxConcurrentOperationCount:1];
[self.queue setDownloadProgressDelegate:self];
}
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDownloadDestinationPath:desPath];
[request setDelegate:self];
[request setDidFinishSelector:@selector(requestDone:)];
[request setDidFailSelector:@selector(requestWentWrong:)];
[self.queue addOperation:request]; //queue is an NSOperationQueue
[self.queue go];
So the question is: Since the above code runs in the background, how can I set the setDownloadProgressDelegate to update a progressView in another view controller? I already have a tableview with the files it's going to download, and have a view just above the tableview that should show the progress of the file being downloaded. Adding to the queue and downloading isn't the problem. It's just getting the progress bar to update.