---
title: NSApplication.ModalResponse
framework: appkit
role: symbol
role_heading: Structure
path: appkit/nsapplication/modalresponse
---

# NSApplication.ModalResponse

A set of button return values for modal dialogs.

## Declaration

```swift
struct ModalResponse
```

## Discussion

Discussion The response value that a button returns can depend on which method is used to present the dialog. See alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:, runModal(), and addButton(withTitle:) for examples.

## Topics

### Responses

- [OK](appkit/nsapplication/modalresponse/ok.md)
- [cancel](appkit/nsapplication/modalresponse/cancel.md)
- [continue](appkit/nsapplication/modalresponse/continue.md)
- [stop](appkit/nsapplication/modalresponse/stop.md)
- [abort](appkit/nsapplication/modalresponse/abort.md)
- [alertFirstButtonReturn](appkit/nsapplication/modalresponse/alertfirstbuttonreturn.md)
- [alertSecondButtonReturn](appkit/nsapplication/modalresponse/alertsecondbuttonreturn.md)
- [alertThirdButtonReturn](appkit/nsapplication/modalresponse/alertthirdbuttonreturn.md)

### Deprecated Responses

- [NSRunStoppedResponse](appkit/nsrunstoppedresponse.md)
- [NSRunAbortedResponse](appkit/nsrunabortedresponse.md)
- [NSRunContinuesResponse](appkit/nsruncontinuesresponse.md)

### Initializers

- [init(_:)](appkit/nsapplication/modalresponse/init(_:).md)
- [init(rawValue:)](appkit/nsapplication/modalresponse/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Constants

- [NSAlert.Style](appkit/nsalert/style.md)
