alright so i have a small problem here, i have this here.
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0)
{
//YES clicked ...do your action
[self.parentViewController dismissModalViewControllerAnimated:YES];
}
else if (buttonIndex == 1)
{
//NO clicked
return;
}
}
This Allows me to capture events triggered from UIAlertView Buttons but i have assigned it a value and on the same page i need another value to be assigned to that class so:
if(buttonIndex == 2){//Proceed}
i mainly want it so that when the button is pushed on my second alert it will go back to the processes it was doing and not proceed with the event of (buttonIndex == 0).
So Does anyone know Where i could start?
Just store a reference in you
.hfile of the 2UIAlertView‘s, and then do a check. For instance, in your.hfile:UIAlertView * alertView1;
UIAlertView * alertView2;
In your
.mfile, set up yourUIAlertView‘s in youviewDidLoadmethod, and change thealertView:clickedButtonAtIndex:method to:Hope that Helps!