Created
August 20, 2012 12:43
-
-
Save dystonie/3403741 to your computer and use it in GitHub Desktop.
Alert Dialog
This file contains 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:@"Text" defaultButton:@"OK" alternateButton:@"Cancel" otherButton:nil | |
informativeTextWithFormat:@"%@",someLocalizedVariable]; | |
[alert beginSheetModalForWindow:mainWindow modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:nil]; | |
//didEnd: | |
-(void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { | |
if (returnCode == NSAlertDefaultReturn) { | |
//Dialogo Risposta | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment