You can get the expected total file size in the following NSURLConnection NSURLConnectionDataDelegate callback NSURLConnectionDataDelegate :
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { self.expectedTotalSize = response.expectedContentLength; }
then in the following callback method you can calculate how much data was received:
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { self.recievedData += data.length; }
And you can use UIProgressView to display the current download status on the screen.
source share