В моем приложении мне нужно показать предупреждение, переходящее к следующему экрану. Когда пользователь нажимает на кнопку «ОК», мне нужно запустить uiactivityIndicator, и предупреждение должно исчезнуть. Так что я могу видеть только индикатор активности, когда пользователь нажимаетХорошо в Alert. Как я могу добиться этого. Вот мой код:
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];
}
}