Not sure if I worded that question correctly. Is there a way to have the button index selected in a UIAlertView returned to the method where the UIAlertView was initiated in?
So
- (void) someMethod {
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Confirm Adding Product" message:Blah, blah, blah" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Yes", @"No", nil];
[alert show];
//some more code - I'd like to get the button index returned here!
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
//anyway to return this to the method above?
if (buttonIndex == 0) {
}
}