The Application Kit, usually called AppKit, is a graphical user interface toolkit for macOS. It comprises a collection of Objective-C classes and protocols that can be used to build an application for the Mac. These classes can also be used in Swift through its Objective-C bridge. Xcode has built-in functionality for developing a Cocoa application using AppKit, including the ability to visually design user interfaces with Interface Builder.
While AppKit is primarily associated with macOS, it was originally developed for use on NeXTSTEP (and, later, OPENSTEP). As in Foundation, its classes and protocols still use the “NS” prefix as a result of this heritage. An open-source clone of AppKit is maintained as part of GNUstep for various other Unix-based OSes.
Of the more than 170 classes included in the Application Kit, the following classes form the core:
NSApplication: a singleton object that represents the application as a whole and tracks its windows and other global state
NSWindow: an object representing a window on screen, it holds a hierarchy of views
NSView: an object representing a rectangular region; it may draw UI content of its own (using drawing engines like Quartz, Core Animation, and Metal), and it may also hold a subtree of other views
NSResponder: an object that can respond to events during the application's lifetime;
NSVieware all subclasses of
NSDocument: an object representing a document saved on disk that manages its display in a window
NSController: an abstract class implementing some functionality for a controller, mediating between views and model objects
|This Macintosh-related article is a stub. You can help Wikipedia by expanding it.|