Skip to content

Instantly share code, notes, and snippets.

@tudormunteanu
Created March 8, 2012 14:35
Show Gist options
  • Select an option

  • Save tudormunteanu/2001265 to your computer and use it in GitHub Desktop.

Select an option

Save tudormunteanu/2001265 to your computer and use it in GitHub Desktop.
UIAlertView (basic)
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Opened from URL"
message:@"App opened trough URL"
delegate:self
cancelButtonTitle:@"Ok"
otherButtonTitles:nil] autorelease];
// optional - add more buttons:
[alert addButtonWithTitle:@"Yes"];
[alert show];
//
// Protocol method of <UIAlertViewDelegate>
//
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
if (buttonIndex == 1) {
// do stuff
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment