In this episode, we'll use AFNetworking to track the progress of a file download and display it in a UIProgressView. Once we've downloaded a small movie, we'll play it using MPMoviePlayerViewController.
Links Episode Source Code Tracking Progress with AFNetworking [op setDownloadProgressBlock:^(NSInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) { if (totalBytesExpectedToRead > 0) { dispatch_async(dispatch_get_main_queue(), ^{ self.progressView.alpha = 1; self.progressView.progress = (float)totalBytesRead / (float)totalBytesExpectedToRead; NSString *label = [NSString stringWithFormat:@"Downloaded %lld of %lld bytes", totalBytesRead, totalBytesExpectedToRead]; self.progressLabel.text = label; }); } }];