I have this code 

```
- (IBAction)save:(id)sender {

    self.imageView.image = [UIImage imageNamed:@"loading.gif"];

    [self.view setUserInteractionEnabled:NO];
    MBProgressHUD *hudSave = [MBProgressHUD showHUDAddedTo:self.navigationController.view  animated:YES];
hudSave.labelText = @"Saving...";

    NSLog(@"save");

    UIAlertView *deco;

    if (!isVideo) {
         UIImageWriteToSavedPhotosAlbum (imageView.image, nil, nil , nil);
         deco = [[UIAlertView alloc]initWithTitle:@"Save" message:@"Your photo has been saved." delegate: nil cancelButtonTitle:@"oK" otherButtonTitles:nil];
    }else{

         //UIAlertView *explain;
        //explain = [[UIAlertView alloc]initWithTitle:@"Wait during processing" message:@"Your video is being filtered, this process may be long, depending of both video and device. Please do not close this app until task is finished." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
            UIAlertView *explain;
            explain = [[UIAlertView alloc]initWithTitle:@"Wait during processing" message:@"Your video is being filtered, this process may be long, depending of both video and device. Please do not close this app until task is finished." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
            [explain show];

            [self InitialisationRefiltrage:urlVideo];

          //[self InitialisationRefiltrage:urlVideo];
        deco = [[UIAlertView alloc]initWithTitle:@"Save" message:@"Your video has been saved." delegate: nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
     } 

     [MBProgressHUD hideHUDForView:self.navigationController.view animated:YES];
     [deco show];

    [self.view setUserInteractionEnabled:YES];

}

```

The problem part is if my file is a video, it goes directly too "initialisationRefiltrage" (who is working fine) but without displaying the MBProgressHUD and the alert view explain, and after my video traitement, it display everything (explain, deco, and the MBProgressHUD) at the same time.

I try something with dispatch, thread, etc... But i think a don't do it correctly, so can you please give me a clue too how to do that.

Have a nice day.