AppKit (formally Application Kit) is a
graphical user interface toolkit. It initially served as the UI framework for
NeXTSTEP. Along with
Foundation and
Display PostScript, it became one of the core parts of the
OpenStep specification of APIs. Later, AppKit and Foundation became part of
Cocoa
Cocoa may refer to:
Chocolate
* Chocolate
* ''Theobroma cacao'', the cocoa tree
* Cocoa bean, seed of ''Theobroma cacao''
* Chocolate liquor, or cocoa liquor, pure, liquid chocolate extracted from the cocoa bean, including both cocoa butter and ...
, the
Objective-C API framework of
macOS.
GNUstep,
GNU's implementation of the OpenStep/Cocoa API, also contains an implementation of the AppKit API.
AppKit comprises a collection of
Objective-C classes and
protocols that can be used to build an application in OpenStep/Cocoa. 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. It relies heavily on patterns like
reference types In computer programming, data types can be divided into two categories: value types (or by-value types) and reference types (or by-reference types). Value types are completely represented by their meaning, while reference types are references to a ...
,
delegation
Delegation is the assignment of authority to another person (normally from a manager to a subordinate) to carry out specific activities. It is the process of distributing and entrusting work to another person,Schermerhorn, J., Davidson, P., Poole ...
,
notifications
Notification may refer to:
* Notification (Holy See), an announcement by a department of the Roman Curia
*Casualty notification, the process of notifying relatives of people who have been killed or seriously injured
* Death notification, the proc ...
,
target–action The term target–action design paradigm refers to a kind of software architecture, where a computer program is divided into objects which dynamically establish relationships by telling each other which object they should target and what action o ...
, and
model–view–controller
Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of infor ...
. A sign of the NeXTSTEP heritage, AppKit's classes and protocols still use the "NS" prefix.
Most of the applications bundled with macOS—for example, the
Finder
Finder may refer to:
* Finder (surname)
* Finder (software), part of the Apple Macintosh operating system
* ''Finder'' (comics), a comic book series by Carla Speed McNeil
* ''Finder'' (novel), a 1994 novel by Emma Bull
* Finder Wyvernspur, a fi ...
,
TextEdit,
Calendar
A calendar is a system of organizing days. This is done by giving names to periods of time, typically days, weeks, months and years. A date is the designation of a single and specific day within such a system. A calendar is also a physi ...
, and
Preview–use AppKit to provide their user interface.
macOS,
iOS,
iPadOS, and
tvOS also support other UI frameworks, including
UIKit, which is derived from AppKit and uses many similar structures, and
SwiftUI, a
Swift-only declarative UI framework.
Prior to
macOS Catalina, macOS also supported
Carbon, a UI framework derived from the
Macintosh Toolbox.
Classes
Of the more than 170 classes included in the Application Kit, the following classes form the core:
AppKit Framework Reference
/ref>
*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; NSApplication
, NSWindow
, and NSView
are all subclasses of NSResponder
*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
See also
* macOS
* Foundation
* Objective-C
* Swift (programming language)
* UIKit
* Cocoa
Cocoa may refer to:
Chocolate
* Chocolate
* ''Theobroma cacao'', the cocoa tree
* Cocoa bean, seed of ''Theobroma cacao''
* Chocolate liquor, or cocoa liquor, pure, liquid chocolate extracted from the cocoa bean, including both cocoa butter and ...
* NeXTSTEP
* OPENSTEP
References
{{reflist
External links
AppKit classes, in OpenStep specification
Apple developer documentation for AppKit
NeXT
MacOS
Application programming interfaces