2010-12-13 6 views
0

私のアプリでは、次の画面にナビゲートする警告を表示する必要があります。ユーザーがokボタンをタップすると、uiactivityIndi​​catorを起動してアラートが消えなければなりません。ユーザーがAlert.Howで、[OK]をタップしたときに、私はSEのみ活動の指標に私はこの.Hereを達成することができますすることができます私のコードです:アラートがポップアップされたときにactivityindicatorを起動する方法

   alert=[[UIAlertView alloc]initWithTitle:@"Deletion" message:@"You are done" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; 
[alert show]; 

[alert release]; 


     -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 
     { 
     action:@selector(otherButtonTitles); 

//index = alertDone.cancelButtonIndex; 
     [alert dismissWithClickedButtonIndex:0 animated:YES]; 
     if(buttonIndex==0) { 

    [self performSelectorInBackground:@selector (activityFunctionForDeletion) withObject:nil]; 


    //alert.hidden=YES; 
    myResults *byDateScreen = [[myResults alloc]initWithNibName:@"myResults" bundle:nil]; 
    [self presentModalViewController:byDateScreen animated:YES]; 
    [byDateScreen dataDisplay]; 
    [byDateScreen release]; 
     [activity stopAnimating]; 
    [activity setHidden:YES]; 
    //[byDateScreen release]; 
    } 
    } 

答えて

0

申し訳guys.Iは私がやった ..私の問題の解決策を発見されました書き込みの代わりに
[alert dismissWithClickedButtonIndex:0 animated:YES];私は '' activityFunctionForDeletion ''メソッドでそれを書きました。

私はokをタップするとアラートが消え、アクティビティのアニメーションが開始されます。

関連する問題