Hi
I have 5 tasks that I want to show in a MBProgressHUD, but only shows the first and then when the job finish it's hide(this works fine) but i dont'know how can I show the other tasks.
I have 5 tasks that I want to show in a MBProgressHUD, but only shows the first and then when the job finish it's hide(this works fine) but i dont'know how can I show the other tasks.
Code:
- (IBAction)btnTest:(id)sender {
JFRed *red = [[JFRed alloc] init];
red.delegado = self;
HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[self.view addSubview:HUD];
HUD.delegate = self;
HUD.labelText = @"Ejecutando";
HUD.detailsLabelText = @"Realizando conexión";
HUD.square = YES;
dispatch_async(dispatch_get_main_queue(), ^{
// this will force loading the psc and do a migration
[red jsonPostRequest:dir tipoId:100 postData:postData]; //My first task
});
}
//The folowing .... they're the rest task
-(void) terminaDescarga:(NSData *)datos conId:(NSInteger)id httpCodeReturn:(int)code httpStringCodereturn:(NSString*)codestring
{
[call another method to do a new task] and has this command ..HUD.detailsLabelText = @"Create tables...."; //Doesen't show
//
//
//
[call another method to do a new task] and has this command ..HUD.detailsLabelText = @"Insert records..."; //Doesen't show
//
//
// remove progress view once we're done.. .this works fine
dispatch_async(dispatch_get_main_queue(), ^{
[MBProgressHUD hideHUDForView:self.view animated:YES]; });
}