Runs the alert as an app-modal dialog and returns the constant positionally identifying the button clicked.
- macOS 10.3+
Response to the alert. See this method’s “Special Considerations” section for details.
You can create the alert either through the standard allocate–initialize procedure or, if necessary in your app, by using the deprecated compatibility method
If you use
alert to create an alert, the following constants are used to identify the button used to dismiss the alert:
NSAlert. Otherwise, the constants used are the ones described in Button Return Values.