タイマーによって閉じられた後に別の UIAlertview を表示できますか? このメソッド UIActivityindicatorview を NSTimer で UIAlertView に使用して、「お待ちください、保存中...」という自己を閉じてから、別の UIAlertView を表示して「正常に保存されました!」と言います。(終わり)。これを達成する方法は?ありがとうございました。
ここで私は同じこの方法を使用していましたが、これは私が必要としているものではありません。最初の uialertview がタイマーによって閉じられた後、別の UIAlertview を表示する必要があります。
もっと明確にする必要があるかどうか教えてください。ここにコードを投稿できます。ありがとうございます。
- (IBAction)showAlert:(id)sender {
UIAlertView* alert_view = [[UIAlertView alloc]
initWithTitle: @"Save" message:@"please wait, saving..." delegate: self
cancelButtonTitle:@"done" otherButtonTitles:nil];
[alert_view show];
[alert_view release];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex==0) {
UIAlertView* alert_view = [[UIAlertView alloc]
initWithTitle: @"Success" message:@"Saved Successfully!" delegate: self
cancelButtonTitle: @"Done" otherButtonTitles:nil];
[alertView dismissWithClickedButtonIndex:0 animated:TRUE];
}
else{
[alertView dismissWithClickedButtonIndex:1 animated:TRUE];
}
}