Skip to content

Instantly share code, notes, and snippets.

@andreortiz82
Last active October 6, 2015 04:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreortiz82/2934606 to your computer and use it in GitHub Desktop.
Save andreortiz82/2934606 to your computer and use it in GitHub Desktop.
AFNetworking ProgressBar
[operation setUploadProgressBlock:^(NSInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
float prog = (totalBytesWritten / (totalBytesExpectedToWrite * 1.0f) * 100);
[self.progBar setProgress:prog];
NSLog(@"%f%% Uploaded", (totalBytesWritten / (totalBytesExpectedToWrite * 1.0f) * 100));
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment