Skip to content

Instantly share code, notes, and snippets.

@samvermette
Last active December 14, 2015 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samvermette/5077983 to your computer and use it in GitHub Desktop.
Save samvermette/5077983 to your computer and use it in GitHub Desktop.
[SVProgressHUD show];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {
for(id object in objects) {
// CPU heavy code
dispatch_async(dispatch_get_main_queue(), ^ {
[SVProgressHUD showProgress:x];
});
}
dispatch_async(dispatch_get_main_queue(), ^ {
[SVProgressHUD dismiss];
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment