NSApplication Overview

Each Application Kit-based application contains a single instance of the NSApplication class that extends the event handling capabilities of NSResponder to communicate with the operating system. NSApplication is a subclass of NSResponder and is implemented as a shared object or Singleton as described in Chapter 6, “Cocoa Design Patterns.” The shared instance can be accessed with NSApplication’s +sharedApplication method or through the NSApp global variable provided by the Application Kit framework.

NSApplication provides the interface between an application and the operating system. The NSApplication instance manages a run loop that receives events from the operating system. NSApplication converts events into instances ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.