Created
November 5, 2014 16:05
-
-
Save Duraiamuthan/d771eef5fa23d9cba2e8 to your computer and use it in GitHub Desktop.
OSX alerview
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
NSAlert *alert=[NSAlert alertWithMessageText:@"message" defaultButton:@"Ok" alternateButton:@"Cancel" otherButton:nil informativeTextWithFormat:@"InformativeText"]; | |
NSInteger i=[alert runModal]; | |
if (i==NSAlertDefaultReturn) { | |
NSLog(@"Ok pressed"); | |
} | |
else{ | |
NSLog(@"Else pressed"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment