According to Apple's documentation , it seems that the only not obsolete method for displaying a warning sheet is beginSheetModalForWindow:completionHandler: where completionHandler block takes an argument of type NSModalResponse . NSModalResponse is an enumeration with 3 possible values : NSModalResponseStop , NSModalResponseAbort and NSModalResponseContinue . So, how do I know which button on the alert sheet was clicked by the user?
source share