Skip to content

Instantly share code, notes, and snippets.

@versluis
Created August 1, 2012 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save versluis/3229107 to your computer and use it in GitHub Desktop.
Save versluis/3229107 to your computer and use it in GitHub Desktop.
How to react to a UIAlertView
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
[self myMethod];
if (buttonIndex ==0) {
NSLog(@"User pressed first button");
} else if (buttonIndex == 1) {
NSLog(@"User pressed second button");
} else {
NSLog(@"There were even more buttons?");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment