An abstract class that forms the basis of event and command processing in AppKit.
- macOS 10.0+
The core classes—
NSResponder, as must any class that handles events. The responder model is built around three components: event messages, action messages, and the responder chain.
NSResponder also plays an important role in the presentation of error information. The default implementations of the
presentError(_:modalFor:delegate:didPresent:contextInfo:) methods send
self, thereby giving subclasses the opportunity to customize the localized information presented in error alerts.
NSResponder then forwards the message to the next responder, passing it the customized
NSError object. The exact path up the modified responder chain depends on the type of application window:
Window owned by document: view > superviews > window > window controller > document object > document controller > the application object
Window with window controller but no documents: view > superviews > window > window controller > the application object
Window with no window controllers: view > superviews > window > the application object