J'essaie d'agir sur n'importe quel bouton est appuyé sur une alerte. J'ai le code suivant et le premier pop d'alerte est en place mais il n'atteint jamais le second.UIAlertView Question
Je l'ai configuré pour que le protocole UIAlertViewProtocol soit également défini dans l'en-tête.
-(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
{
if(buttonIndex != [actionSheet cancelButtonIndex])
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Something actually happened" message:@"Something was done" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"test",nil];
[alert show];
}
}
-(void)alert:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex ==0)
{
NSLog(@"tetetete");
UIAlertView *a = [[UIAlertView alloc] initWithTitle:@"test" message:@"test" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[a show];
[a release];
[alert release];
}
}