I'm using MDProgressHUD to manage the progress of my downloads which uses NSConnection. Everything is working great. I'm having an issue when I try to change the HUD labelText from saying Downloading to Finishing Up when connectionDidFinishLoading is called.
In my connectionDidFinishLoading method I'm changing the labelText and changing the icon to a checkmark , like in the example app.
HUD.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"37x-Checkmark.png"]];
HUD.mode = MBProgressHUDModeCustomView;
HUD.labelText = @"Finishing Up";
NSLog(@"show change now!!!");
Right after that code I unzip the download and do some db manipulation.
But for some reason it doesn't change until the end of the function is reached where [HUD hide:YES afterDelay:4]; is called.
I would like it to change before it starts to unzip my contents because the download is full and it makes the app look like its hanging or frozen.
I'm using zipArchive to do the extraction if it matters.
Any advice would be appreciated.
For anyone else coming back to this, note that setting:
HUD.hidden = YES;
is not sufficient for the delegate method to be called. You must actually call:
[HUD hide:YES];