I would like to add a completion callback on my method so that the progress of the HUD knows it is complete.
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeAnnularDeterminate;
hud.labelText = @"Loading";
[self doSomethingInBackgroundWithProgressCallback:^(float progress) {
hud.progress = progress;
} completionCallback:^{
[MBProgressHUD hideHUDForView:self.view animated:YES];
}];
What would I need to add to my method to confirm it is complete, or trigger this completionCallback from above?
In this case my method could be anything for example:
-(void)doSomethignInBackgroundWithProgressCallback {
sleep(100);
}