Hi all,
I am trying to act upon whichever button is pressed on an alert. I have the following code and the first alert pop's up but it never gets to the second one.
I have set it up so that the UIAlertViewProtocol is defined in the header too.
-(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];
}
}