Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

joak

macrumors newbie
Original poster
Mar 7, 2014
27
0
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.

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
{
    HUD.detailsLabelText = @"Preparando Base de Datos"; //Doesen't show
    //
    //
    //
    HUD.detailsLabelText = @"Preparando Inserts";
    //
    //
   // remove progress view once we're done.. .this works fine
        dispatch_async(dispatch_get_main_queue(), ^{
            [MBProgressHUD hideHUDForView:self.view animated:YES];    });
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.