Skip to content

Instantly share code, notes, and snippets.

@penumbrasoftware
Created January 22, 2014 11:21
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 penumbrasoftware/8557122 to your computer and use it in GitHub Desktop.
Save penumbrasoftware/8557122 to your computer and use it in GitHub Desktop.
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Title goes here"
message:@"Message goes here?"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"other buttons go here, nil];
[alert show];
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSString *title = [alertView buttonTitleAtIndex:buttonIndex];
if([title isEqualToString:@"Button pressed goes here"])
{
Action goes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment