Skip to content

Instantly share code, notes, and snippets.

@Duraiamuthan
Created November 5, 2014 16:05

Revisions

  1. Duraiamuthan created this gist Nov 5, 2014.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    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");
    }