AppKit
graphical user interface toolkit for macOS applications
≈ 4 min read
Names in other languages
- NederlandsApplication Kit
- PortuguêsApplication KitApplication kit
- 中文应用程序工具包應用軟件開發包
- 简体中文应用程序工具包
- 繁體中文應用程式工具包應用程序工具包
- EnglishAppKitOpenStep Application Kit, Application Kit
- FrançaisAppKitApplication Kit, OpenStep Application Kit
- हिन्दीAppKit
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
AppKit (formally Application Kit)[1] is a graphical user interface toolkit. It initially served as the UI framework for NeXTSTEP.[2] 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, 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, delegation, notifications, target–action, and model–view–controller. 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, TextEdit, Calendar, 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
edit edit sourceOf the more than 170 classes included in the Application Kit, the following classes form the core:[3]
NSApplication: a singleton object that represents the application as a whole and tracks its windows and other global stateNSWindow: an object representing a window on screen, it holds a hierarchy of viewsNSView: 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 viewsNSResponder: an object that can respond to events during the application's lifetime;NSApplication,NSWindow, andNSVieware all subclasses ofNSResponderNSDocument: an object representing a document saved on disk that manages its display in a windowNSController: an abstract class implementing some functionality for a controller, mediating between views and model objects
See also
edit edit sourceReferences
edit edit source- ^ AppKit Release Notes for macOS 10.13. Apple Documentation Archive. Retrieved 23 Oct 2017. Wikipedia revision 1317281005, retrieved 2026-11-19
- ^ The legacy of NeXT lives on in OS X — Ars Technica, Dec 2012. Wikipedia revision 1317281005, retrieved 2026-11-19
- ^ AppKit Framework Reference — Apple Developer Wikipedia revision 1317281005, retrieved 2026-11-19
External links
edit edit source- AppKit classes in OpenStep specification
- AppKit in Apple Developer Documentation
user interface
Text derived from https://en.wikipedia.org/w/index.php?oldid=1317281005 under CC BY-SA 4.0; modifications have been made.