私はこのコードを持っています
- (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];
}
問題の部分は、私のファイルがビデオの場合、「initialisationRefiltrage」(正常に動作している) に直接行きますが、MBProgressHUD と警告ビューの説明を表示せずに、ビデオの特徴の後にすべてを表示します (説明、デコ、およびMBProgressHUD) を同時に実行します。
ディスパッチ、スレッドなどで何かを試してみます...しかし、正しく行われていないと思うので、その方法についても手がかりを教えてください。
良い1日を。