I'm working on a problem where I have to download around 10 different large files in a queue, and I need to display a progress bar indicating the status of the total transfer. I have this working just fine with ASIHTTPRequest in iOS4, but I'm trying to transition to AFNetworking since ASIHTTPRequest has issues in iOS5 and is no longer maintained.
I know you can report progress on individual requests using AFHTTPRequestOperation's downloadProgressBlock, but I can't seem to find a way to report overall progress of multiple requests that would be executed on the same NSOperationQueue.
Any suggestions? Thanks!
[operation setUploadProgressBlock:^(NSInteger bytesWritten, NSInteger totalBytesWritten, NSInteger totalBytesExpectedToWrite) {
NSLog(@"Sent %d of %d bytes", totalBytesWritten, totalBytesExpectedToWrite);
}];
Operation is AFHTTPRequestOperation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With