In my app, I am loading a resource heavy view that takes about 1 to 2 seconds to load. So I am loading it in a separate thread like this:
hud = [[MBProgressHUD alloc] init];
[hud showWhileExecuting:@selector(loadWorkbench:) onTarget:self withObject:nil animated:YES];
however it never appears, and application looks frozen to the end user. any ideas where I have gone wrong?
Yes. It does not appear because you never tell add the HUD as a subview of the window. try something like:
Since you are setting yourself as the HUD delegate, also add the following delegate method:
and remember to add
MBProgressHUDDelegatein the corresponding header file.