Created
March 8, 2012 14:35
-
-
Save tudormunteanu/2001265 to your computer and use it in GitHub Desktop.
UIAlertView (basic)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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