Mac Developer Library

Developer

AppKit Framework Reference

AppKit

Classes   Protocols   Other Reference  

AppKit is a framework containing all the objects you need to implement your graphical, event-driven user interface: windows, panels, buttons, menus, scrollers, and text fields. AppKit handles all the details for you as it efficiently draws on the screen, communicates with hardware devices and screen buffers, clears areas of the screen before drawing, and clips views. The number of classes in AppKit may seem daunting at first. However, most AppKit classes are support classes that you use indirectly. You also have the choice at which level you use AppKit:

  • Use Interface Builder to create connections from user interface objects to your application objects. In this case, all you need to do is implement your application classes—implement those action and delegate methods. For example, implement the method that is invoked when the user selects a menu item.

  • Control the user interface programmatically, which requires more familiarity with AppKit classes and protocols. For example, allowing the user to drag an icon from one window to another requires some programming and familiarity with the NSDragging... protocols.

  • Implement your own objects by subclassing NSView or other classes. When subclassing NSView you write your own drawing methods using graphics functions. Subclassing requires a deeper understanding of how AppKit works.

To learn more about AppKit, review the NSApplication, NSWindow, and NSView class specifications, paying close attention to delegate methods. For a deeper understanding of how AppKit works, see the specifications for NSResponder and NSRunLoop (NSRunLoop is in the Foundation framework).

AppKit Classes and Protocols

AppKit is large; it comprises more than 125 classes and protocols. The classes all descend from the Foundation framework’s NSObject class. The following sections briefly describe some of the topics that AppKit addresses through its classes and protocols.

Encapsulating an Application

Every application uses a single instance of NSApplication to control the main event loop, keep track of the application’s windows and menus, distribute events to the appropriate objects (that is, itself or one of its windows), set up autorelease pools, and receive notification of application-level events. An NSApplication object has a delegate (an object that you assign) that is notified when the application starts or terminates, is hidden or activated, should open a file selected by the user, and so forth. By setting the NSApplication object’s delegate and implementing the delegate methods, you customize the behavior of your application without having to subclass NSApplication.

General Event Handling and Drawing

The NSResponder class defines the responder chain, an ordered list of objects that respond to user events. When the user clicks the mouse button or presses a key, an event is generated and passed up the responder chain in search of an object that can “respond” to it. Any object that handles events must inherit from the NSResponder class. The core AppKit classes, NSApplication, NSWindow, and NSView, inherit from NSResponder.

An NSApplication object maintains a list of NSWindow objects—one for each window belonging to the application—and each NSWindow object maintains a hierarchy of NSView objects. The view hierarchy is used for drawing and handling events within a window. An NSWindow object handles window-level events, distributes other events to its views, and provides a drawing area for its views. An NSWindow object also has a delegate allowing you to customize its behavior.

NSView is an abstract class for all objects displayed in a window. All subclasses implement a drawing method using graphics functions; drawRect: is the primary method you override when creating a new NSView subclass.

Panels

The NSPanel class is a subclass of NSWindow that you use to display transient, global, or pressing information. For example, you would use an instance of NSPanel, rather than an instance of NSWindow, to display error messages or to query the user for a response to remarkable or unusual circumstances. AppKit implements some common panels for you such as the Save, Open and Print panels, used to save, open, and print documents. Using these panels gives the user a consistent “look and feel” across applications for common operations.

Menus and Cursors

The NSMenu, NSMenuItem, and NSCursor classes define the look and behavior of the menus and cursors that your application displays to the user.

Grouping and Scrolling Views

The NSBox, NSScrollView, and NSSplitView classes provide graphic “accessories” to other view objects or collections of views in windows. With the NSBox class, you can group elements in windows and draw a border around the entire group. The NSSplitView class lets you “stack” views vertically or horizontally, apportioning to each view some amount of a common territory; a sliding control bar lets the user redistribute the territory among views. The NSScrollView class and its helper class, NSClipView, provide a scrolling mechanism as well as the graphic objects that let the user initiate and control a scroll. The NSRulerView class allows you to add a ruler and markers to a scroll view.

Controlling an Application

The NSControl and NSCell classes, and their subclasses, define a common set of user interface objects such as buttons, sliders, and browsers that the user can manipulate graphically to control some aspect of your application. Just what a particular control affects is up to you: When a control is “touched,” it sends an action message to a target object. You typically use Interface Builder to set these targets and actions by Control-dragging from the control object to your application or other object. You can also set targets and actions programmatically.

An NSControl object is associated with one or more NSCell objects that implement the details of drawing and handling events. For example, a button comprises both an NSButton object and an NSButtonCell object. The reason for this separation of functionality is primarily to allow NSCell classes to be reused by NSControl classes. For example, NSMatrix and NSTableView can contain multiple NSCell objects of different types.

Tables

The NSTableView class displays data in row and column form. NSTableView is ideal for, but not limited to, displaying database records, where rows correspond to each record and columns contain record attributes. The user can edit individual cells and rearrange the columns. You control the behavior and content of an NSTableView object by setting its delegate and data source objects.

Text and Fonts

The NSTextField class implements a simple editable text field, and the NSTextView class provides more comprehensive editing features for larger text bodies.

NSTextView, a subclass of the abstract NSText class, defines the interface to Cocoa’s extended text system. NSTextView supports rich text, attachments (graphics, file, and other), input management and key binding, and marked text attributes. NSTextView works with the font panel and menu, rulers and paragraph styles, the Services facility (for example, the spell-checking service), and the pasteboard. NSTextView also allows customizing through delegation and notifications—you rarely need to subclass NSTextView. You rarely create instances of NSTextView programmatically either, since objects on Interface Builder’s palettes, such as NSTextField, NSForm, and NSScrollView, already contain NSTextView objects.

It is also possible to do more powerful and more creative text manipulation (such as displaying text in a circle) using NSTextStorage, NSLayoutManager, NSTextContainer, and related classes.

The NSFont and NSFontManager classes encapsulate and manage font families, sizes, and variations. The NSFont class defines a single object for each distinct font; for efficiency, these objects, which can be rather large, are shared by all the objects in your application. The NSFontPanel class defines the font specification panel that’s presented to the user.

Graphics and Color

The classes NSImage and NSImageRep encapsulate graphics data, allowing you to easily and efficiently access images stored in files on the disk and displayed on the screen. NSImageRep subclasses each know how to draw an image from a particular kind of source data. The presentation of an image is greatly influenced by the hardware that it’s displayed on. For example, a particular image may look good on a color monitor, but may be too “rich” for monochrome. Through the image classes, you can group representations of the same image, where each representation fits a specific type of display device—the decision of which representation to use can be left to the NSImage class itself.

Color is supported by the classes NSColor, NSColorPanel, NSColorList, NSColorPicker, and NSColorWell. NSColor supports a rich set of color formats and representations, including custom ones. The other classes are mostly interface classes: They define and present panels and views that allow the user to select and apply colors. For example, the user can drag colors from the color panel to any color well. The NSColorPicking protocol lets you extend the standard color panel.

Dragging

With very little programming on your part, custom view objects can be dragged and dropped anywhere. Objects become part of this dragging mechanism by conforming to NSDragging... protocols: draggable objects conform to the NSDraggingSource protocol, and destination objects (receivers of a drop) conform to the NSDraggingDestination protocol. AppKit hides all the details of tracking the cursor and displaying the dragged image.

Printing

The NSPrinter, NSPrintPanel, NSPageLayout, and NSPrintInfo classes work together to provide the means for printing the information that your application displays in its windows and views. You can also create an EPS representation of an NSView.

Accessing the File System

Use the NSFileWrapper class to create objects that correspond to files or directories on disk. NSFileWrapper will hold the contents of the file in memory so that it can be displayed, changed, or transmitted to another application. It also provides an icon for dragging the file or representing it as an attachment. Or use the NSFileManager class in the Foundation framework to access and enumerate file and directory contents. The NSOpenPanel and NSSavePanel classes also provide a convenient and familiar user interface to the file system.

Sharing Data With Other Applications

The NSPasteboard class defines the pasteboard, a repository for data that’s copied from your application, making this data available to any application that cares to use it. NSPasteboard implements the familiar cut-copy-paste operation. The NSServicesRequest protocol uses the pasteboard to communicate data that’s passed between applications by a registered service.

Checking Spelling

The NSSpellServer class lets you define a spell-checking service and provide it as a service to other applications. To connect your application to a spell-checking service, you use the NSSpellChecker class. The NSIgnoreMisspelledWords and NSChangeSpelling protocols support the spell-checking mechanism.

Localization

If an application is to be used in more than one part of the world, its resources may need to be customized, or “localized,” for language, country, or cultural region. For example, an application may need to have separate Japanese, English, French, and German versions of character strings, icons, nib files, or context help. Resource files specific to a particular language are grouped together in a subdirectory of the bundle directory (the directories with the “.lproj” extension). Usually you set up localization resource files using Interface Builder. See the specifications for NSBundle AppKit Additions Reference and NSBundle class for more information on localization (NSBundle is in the Foundation framework).

Classes

Class

Abstract

NSObject

NSObject is the root class of most Objective-C class hierarchies.

NSAccessibilityElement

This class provides the basic infrastructure required to interact with an accessibility client.

NSAlert

An NSAlert object displays an alert, either as an application-modal dialog or as a sheet attached to a document window.

NSAnimation

Objects of the NSAnimation class manage the timing and progress of animations in the user interface.

NSViewAnimation

The NSViewAnimation class, a public subclass of NSAnimation, offers a convenient way to animate multiple views and windows.

NSAnimationContext

NSAnimationContext is analogous to CATransaction and are similar in overall concept to NSGraphicsContext.

NSAppearance

An NSAppearance object represents a file that specifies a standard or custom appearance that applies to a subset of UI elements in an app.

NSBezierPath

An NSBezierPath object allows you to create paths using PostScript-style commands.

NSCell

The NSCell class provides a mechanism for displaying text or images in an NSView object without the overhead of a full NSView subclass.

NSActionCell

An NSActionCell defines an active area inside a control (an instance of NSControl or one of its subclasses).

NSButtonCell

The NSButtonCell class is a subclass of NSActionCell used to implement the user interfaces of push buttons, checkboxes (switches), and radio buttons.

NSMenuItemCell

NSMenuItemCell is a class that handles the measurement and display of a single menu item in its encompassing frame.

NSPopUpButtonCell

The NSPopUpButtonCell class defines the visual appearance of pop-up buttons that display pop-up or pull-down menus.

NSDatePickerCell

An NSDatePickerCell instance controls the behavior of an NSDatePicker control, or of a single date picker cell in a matrix.

NSFormCell

The NSFormCell class is used to implement text entry fields in a form.

NSLevelIndicatorCell

NSLevelIndicatorCell is a subclass of NSActionCell that provides several level indicator display styles including: capacity, ranking and relevancy.

NSPathCell

NSPathCell implements the user interface of an NSPathControl object.

NSSegmentedCell

The NSSegmentedCell class implements the appearance and behavior of a horizontal button divided into multiple segments.

NSSliderCell

An NSSliderCell object controls the appearance and behavior of an NSSlider object, or of a single slider in an NSMatrix object.

NSStepperCell

An NSStepperCell object controls the appearance and behavior of an NSStepper object.

NSTextFieldCell

The NSTextFieldCell class adds to the text display capabilities of the NSCell class by allowing you to set the color of both the text and its background.

NSComboBoxCell

NSComboBoxCell is a subclass of NSTextFieldCell used to implement the user interface of “combo boxes” (see NSComboBox for information on how combo boxes look and work).

NSPathComponentCell

The NSPathComponentCell class displays a component of a path.

NSSearchFieldCell

The NSSearchFieldCell class defines the programmatic interface for text fields that are optimized for text-based searches.

NSSecureTextFieldCell

NSSecureTextFieldCell works with NSSecureTextField to provide a text field whose value is guarded from user examination.

NSTableHeaderCell

The NSTableHeaderCell class is used by an NSTableHeaderView instance to draw the content of the column headers.

NSTokenFieldCell

NSTokenFieldCell is a subclass of NSTextFieldCell that provides tokenized editing of an array of objects similar to the address field in the Mail application.

NSBrowserCell

The NSBrowserCell class is the subclass of NSCell used by default to display data in the columns of an NSBrowser object.

NSImageCell

An NSImageCell object displays a single image (encapsulated in an NSImage object) in a frame.

NSTextAttachmentCell

NSTextAttachmentCell implements the functionality of the NSTextAttachmentCell protocol.

NSColor

An NSColor object represents a color, which is defined in a color space, each point of which has a set of components (such as red, green, and blue) that uniquely define a color.

NSColorList

An NSColorList object is an ordered list of NSColor objects, identified by keys.

NSColorPicker

The NSColorPicker class is an abstract superclass that implements the NSColorPickingDefault protocol.

NSColorSpace

The NSColorSpace class enables the creation of objects representing custom color spaces.

NSController

NSController is an abstract class that implements the NSEditor and NSEditorRegistration informal protocols required for controller classes.

NSObjectController

NSObjectController is a Cocoa bindings-compatible controller class.

NSArrayController

NSArrayController is a bindings compatible class that manages a collection of objects.

NSDictionaryController

NSDictionaryController is a bindings compatible class that manages display and editing of the contents of an NSDictionary object.

NSTreeController

The NSTreeController is a bindings compatible controller that manages a tree of objects.

NSUserDefaultsController

NSUserDefaultsController is a Cocoa bindings compatible controller class.

NSCursor

Instances of the NSCursor class manage the appearance of the cursor.

NSDockTile

The NSDockTile class lets you customize the visual representation for your application’s miniaturized windows and application icon as they appear in the Dock.

NSDocument

The NSDocument abstract class defines the interface for OS X documents.

NSPersistentDocument

The NSPersistentDocument class is a subclass of NSDocument that is designed to easily integrate into the Core Data framework.

NSDocumentController

An NSDocumentController object manages an application’s documents.

NSDraggingImageComponent

The NSDraggingImageComponent class represents a single object in a dragging item.

NSDraggingItem

The NSDraggingItem class encompasses a single dragged item within an NSDraggingSession instance.

NSDraggingSession

The NSDraggingSession class encompases a drag and drop action and allows modification of the drag while in progress.

NSEvent

An NSEvent object, or simply an event, contains information about an input action such as a mouse click or a key down.

NSFont

NSFont objects represent fonts to an application, providing access to characteristics of the font and assistance in laying out glyphs relative to one another.

NSFontCollection

The NSFontCollection class represents a font collection, that is, a group of font descriptors taken together as a single object.

NSMutableFontCollection

NSMutableFontCollection is a dedicated class that represents a mutable collection of fonts.

NSFontDescriptor

NSFontDescriptor objects provide a mechanism to describe a font with a dictionary of attributes.

NSFontManager

NSFontManager is the center of activity for the font conversion system.

NSGestureRecognizer

NSClickGestureRecognizer

NSMagnificationGestureRecognizer

NSPanGestureRecognizer

NSPressGestureRecognizer

NSRotationGestureRecognizer

NSGlyphGenerator

An NSGlyphGenerator object performs the initial, nominal glyph generation phase in the layout process.

NSGlyphInfo

An NSGlyphInfo object represents a glyph attribute value (NSGlyphInfoAttributeName) in an attributed string (NSAttributedString).

NSGradient

The NSGradient class provides support for drawing gradient fill colors, also known as shadings in Quartz.

NSGraphicsContext

The NSGraphicsContext class is the programmatic interface to objects that represent graphics contexts.

NSHelpManager

The NSHelpManager class provides an approach to displaying online help.

NSImage

The NSImage class is a high-level interface for manipulating image data.

NSImageRep

The NSImageRep class is a semiabstract superclass (“semi” because it has some instance variables and implementation of its own).

NSBitmapImageRep

The NSBitmapImageRep class renders an image from bitmap data.

NSCachedImageRep

An NSCachedImageRep object store image data in a form that can be readily transferred to the screen.

NSCIImageRep

An NSCIImageRep object can render an image from a Core Image CIImage instance.

NSCustomImageRep

An NSCustomImageRep object uses a delegate object to render an image.

NSEPSImageRep

An NSEPSImageRep object can render an image from encapsulated PostScript (EPS) code.

NSPDFImageRep

An NSPDFImageRep object can render an image from a PDF format data stream.

NSPICTImageRep

An NSPICTImageRep object renders an image from a PICT format data stream as described in the Carbon QuickDraw Manager documentation.

NSInputManager

NSInputServer

NSLayoutConstraint

A constraint defines a relationship between two attributes of user interface objects that must be satisfied by the constraint-based layout system.

NSLayoutManager

An NSLayoutManager object coordinates the layout and display of characters held in an NSTextStorage object.

NSMediaLibraryBrowserController

An NSMediaLibraryBrowserController instance configures and displays a Media Library Browser panel.

NSMenu

The NSMenu class defines an object that manages an application’s menus.

NSMenuItem

The NSMenuItem class defines objects that are used as command items in menus.

NSMovie

NSNib

Instances of the NSNib class serve as object wrappers, or containers, for Interface Builder nib files.

NSNibConnector

NSNibControlConnector

NSNibOutletConnector

NSOpenGLContext

All OpenGL calls are rendered into an OpenGL graphics context, which in Cocoa is represented by the NSOpenGLContext class.

NSOpenGLPixelBuffer

The NSOpenGLPixelBuffer class gives Cocoa OpenGL implementations access to accelerated offscreen rendering.

NSOpenGLPixelFormat

To render with OpenGL into an NSOpenGLContext, you must specify the context’s pixel format.

NSPageLayout

NSPageLayout is a panel that queries the user for information such as paper type and orientation.

NSParagraphStyle

The NSParagraphStyle class and its subclass NSMutableParagraphStyle encapsulate the paragraph or ruler attributes used by the NSAttributedString classes.

NSMutableParagraphStyle

The NSMutableParagraphStyle class adds methods to its superclass, NSParagraphStyle, for changing the values of the subattributes in a paragraph style attribute.

NSPasteboard

NSPasteboard objects transfer data to and from the pasteboard server.

NSPasteboardItem

NSPasteboardItem is a generic class to represent an item on a pasteboard.

NSPathControlItem

NSPDFInfo

An NSPDFInfo object stores information associated with the creation of a PDF file, such as its URL, tag names, page orientation, and paper size.

NSPDFPanel

An NSPDFPanel object is used to implement a Save or Export as PDF panel that’s consistent with the OS X user interface.

NSPredicateEditorRowTemplate

NSPredicateEditorRowTemplate describes available predicates and how to display them.

NSPrinter

An NSPrinter object describes a printer’s capabilities.

NSPrintInfo

An NSPrintInfo object stores information that’s used to generate printed output.

NSPrintOperation

An NSPrintOperation object controls operations that generate Encapsulated PostScript (EPS) code, Portable Document Format (PDF) code, or print jobs.

NSPrintPanel

An NSPrintPanel object creates the Print panel used to query the user for information about a print job.

NSResponder

NSResponder is an abstract class that forms the basis of event and command processing in the Application Kit.

NSApplication

An NSApplication object manages an app’s main event loop in addition to resources used by all of that app’s objects.

NSDrawer

An NSDrawer object is a user interface element that contains and displays view objects including NSTextView, NSScrollView, NSBrowser, and other classes that inherit from NSView.

NSPopover

The NSPopover class provides a means to display additional content related to existing content on the screen.

NSView

The NSView class defines the basic drawing, event-handling, and printing architecture of an app.

NSBox

The NSBox class implements simple views that can title themselves and draw a border around their content.

NSClipView

An NSClipView contains and scrolls the document view displayed by an NSScrollView.

NSCollectionView

NSCollectionView class displays an array of content as a grid of views.

NSControl

NSControl is an abstract superclass that provides three fundamental features for implementing user interface devices: drawing devices on the screen, responding to user events, and sending action messages.

NSBrowser

This class provides a user interface for displaying and selecting items from a list of data or from hierarchically organized lists of data such as directory paths.

NSButton

The NSButton class is a subclass of NSControl that intercepts mouse-down events and sends an action message to a target object when it’s clicked or pressed.

NSPopUpButton

The NSPopUpButton class defines objects that implement the pop-up and pull-down menus of the graphical user interface.

NSStatusBarButton

NSColorWell

An NSColorWell object is an NSControl for selecting and displaying a single color value.

NSDatePicker

NSDatePicker is a subclass of NSControl that provides a user interface for displaying and editing an NSDate object.

NSImageView

An NSImageView object displays a single image from an NSImage object in a frame.

NSLevelIndicator

NSLevelIndicator is a subclass of NSControl that displays a value on a linear scale.

NSMatrix

NSMatrix is a class used for creating groups of NSCell objects that work together in various ways.

NSForm

An NSForm object is a vertical matrix of NSFormCell objects to implement the fields.

NSPathControl

NSPathControl is a subclass of NSControl that represents a file system path or virtual path.

NSRuleEditor

An NSRuleEditor object is a view that allows the user to visually create and configure a list of options which are expressed by the rule editor as a predicate (see Predicate Programming Guide).

NSPredicateEditor

NSPredicateEditor is a subclass of NSRuleEditor that is specialized for editing NSPredicate objects.

NSScroller

An NSScroller object controls scrolling of a document view within the clip view of an NSScrollView instance (or potentially of another kind of container view).

NSSegmentedControl

An NSSegmentedControl object implements a horizontal button made of multiple segments.

NSSlider

An NSSlider object displays a range of values for something in the application.

NSStepper

A stepper consists of two small arrows that can increment and decrement a value that appears beside it, such as a date or time.

NSTableView

An NSTableView object displays data for a set of related records, with rows representing individual records and columns representing the attributes of those records.

NSOutlineView

NSOutlineView is a subclass of NSTableView that uses a row-and-column format to display hierarchical data that can be expanded and collapsed, such as directories and files in a file system.

NSTextField

An NSTextField object is a kind of NSControl that displays text that the user can select or edit and that sends its action message to its target when the user presses the Return key while editing.

NSComboBox

An NSComboBox is a kind of NSControl that allows you to either enter text directly (as you would with an NSTextField) or click the attached arrow at the right of the combo box and select from a displayed (“pop-up”) list of items.

NSSearchField

An NSSearchField object implements a text field control that is optimized for performing text-based searches.

NSSecureTextField

NSSecureTextField is a subclass of NSTextField that hides its text from display or other access via the user interface.

NSTokenField

NSTokenField is a subclass of NSTextField that provides tokenized editing similar to the address field in the Mail application.

NSMenuView

The NSMenuView class handles the display of menus on the user’s screen.

NSMovieView

NSOpenGLView

An NSOpenGLView object maintains an NSOpenGLPixelFormat and NSOpenGLContext object into which OpenGL calls can be rendered.

NSProgressIndicator

The NSProgressIndicator class lets an application display a progress indicator to show that a lengthy task is under way.

NSQuickDrawView

NSRulerView

An NSRulerView displays a ruler and markers above or to the side of an NSScrollView’s document view.

NSScrollView

The NSScrollView class is the central coordinator for the Application Kit’s scrolling machinery, composed of this class, and the NSClipView, and NSScroller classes .

NSSplitView

A split view manages the dividers and orientation for a split view controller (an instance of the NSSplitViewController class.

NSStackView

A stack view employs Auto Layout (the system’s constraint-based layout feature) to arrange and align an array of views according to your specification.

NSTableCellView

The NSTableCellView class is a reusable container view shown for a particular cell in an NSTableView instance that uses rows for content.

NSTableHeaderView

An NSTableHeaderView is used by an NSTableView to draw headers over its columns and to handle mouse events in those headers.

NSTableRowView

The NSTableRowView class is the view shown for a row in an NSTableView.

NSTabView

An NSTabView object provides a convenient way to present information in multiple pages.

NSText

NSText declares the most general programmatic interface for objects that manage text.

NSTextView

The NSTextView class is the front-end class to the Application Kit’s text system.

NSVisualEffectView

NSVisualEffectView provides support for the user interface effects introduced in OS X Yosemite related to translucency, including “vibrant” appearances.

NSViewController

A view controller manages a view, typically loaded from a nib file.

NSCollectionViewItem

The NSCollectionViewItem class is a view controller subclass that manages the relationship between a compound view and the model object that provides its content.

NSPageController

The NSPageController class is used for controlling swipe navigation and animations between views or view content.

NSSplitViewController

A split view controller manages an array of adjacent child views, and has a split view object for managing dividers between those views.

NSTabViewController

NSTitlebarAccessoryViewController

NSWindow

The NSWindow class defines objects (known as windows) that manage and coordinate the windows an application displays on the screen.

NSPanel

The NSPanel class implements a special kind of window (known as a panel), typically performing an auxiliary function.

NSColorPanel

The NSColorPanel class provides a standard user interface for selecting color in an application.

NSFontPanel

The NSFontPanel class implements the Font panel—a user interface object that displays a list of available fonts, letting the user preview them and change the font used to display text.

NSSavePanel

An NSSavePanel object creates and manages a Save panel and allows you to run the panel in a modal loop.

NSOpenPanel

The NSOpenPanel class provides the Open panel for the Cocoa user interface.

NSWindowController

An NSWindowController object manages a window, usually a window stored in a nib file.

NSRulerMarker

An NSRulerMarker object displays a symbol on an NSRulerView object, indicating a location for whatever graphics element it represents in the client of the ruler view (for example, a margin or tab setting, or the edges of a graphic on the page).

NSRunningApplication

NSRunningApplication is a class to manipulate and provide information for a single instance of an application.

NSScreen

An NSScreen object describes the attributes of a computer’s monitor, or screen.

NSShadow

An NSShadow object encapsulates the attributes used to create a drop shadow during drawing operations.

NSSharingService

The NSSharingService class is used to provide a consistent user experience when sharing items on OS X.

NSSharingServicePicker

The NSSharingServicePicker class presents a list of sharing services, so that the user can choose a service to share an item.

NSSound

The NSSound class provides a simple interface for loading and playing audio files.

NSSpeechRecognizer

The NSSpeechRecognizer class is the Cocoa interface to Speech Recognition on OS X.

NSSpeechSynthesizer

The NSSpeechSynthesizer class is the Cocoa interface to Speech Synthesis on OS X.

NSSpellChecker

The NSSpellChecker class provides an interface to the Cocoa spell-checking service.

NSSplitViewItem

NSStatusBar

The NSStatusBar class defines an object that manages a collection of NSStatusItem objects displayed within the system-wide menu bar.

NSStatusItem

The NSStatusItem class represents the individual elements displayed within an NSStatusBar object.

NSStoryboard

A storyboard encapsulates the design-time view controller and window controller graph represented in an Interface Builder storyboard resource file.

NSStoryboardSegue

A storyboard segue specifies a transition or containment relationship between two scenes in a storyboard, where a scene is a view controller or a window controller and a storyboard is an instance of the NSStoryboard class.

NSTableColumn

The NSTableColumn class stores the display characteristics and identifier for a column in an NSTableView instance.

NSTabViewItem

An NSTabViewItem is a convenient way for presenting information in multiple pages.

NSTextAlternatives

NSTextAlternatives is an immutable value class that stores a list of alternatives for a piece of text and communicates the user’s selection of an alternative via a notification to your app.

NSTextAttachment

NSTextAttachment objects are used by the NSAttributedString class cluster as the values for attachment attributes (stored in the attributed string under the key named NSAttachmentAttributeName).

NSTextBlock

NSTextBlock objects represent a block of text laid out in a subregion of the text container.

NSTextTable

An NSTextTable object represents a text table as a whole.

NSTextTableBlock

An NSTextTableBlock object represents a text block that appears as a cell in a text table.

NSTextContainer

The NSTextContainer class defines a region where text is laid out.

NSTextFinder

The NSTextFinder class provides an optional search and replace find-bar interface inside a view, usually a scroll view.

NSTextInputContext

An NSTextInputContext object represents the Cocoa text input system.

NSTextList

An NSTextList object represents a section of text that forms a single list.

NSTextTab

An NSTextTab object represents a tab in an NSParagraphStyle object, storing an alignment type and location.

NSToolbar

NSToolbar and NSToolbarItem provide the mechanism for a titled window to display a toolbar just below its title bar, as shown below: .

NSToolbarItem

The NSToolbarItem class defines each item contained within a window’s NSToolbar instance.

NSToolbarItemGroup

NSToolbarItemGroup is a subclass of NSToolbarItem which contains subitems.

NSTouch

An instance of the NSTouch class is a snapshot of a particular touch at an instant in time.

NSTrackingArea

An NSTrackingArea object defines a region of view that generates mouse-tracking and cursor-update events when the mouse is over that region.

NSTreeNode

NSTreeNode simplifies the creation and management of trees of objects.

NSTypesetter

NSLayoutManager uses concrete subclasses of this abstract class, NSTypesetter, to perform line layout, which includes word wrapping, hyphenation, and line breaking in either vertical or horizontal rectangles.

NSATSTypesetter

NSATSTypesetter is a concrete subclass of NSTypesetter that places glyphs during the text layout process.

NSWorkspace

An NSWorkspace object responds to app requests to perform a variety of services: .

NSMutableAttributedString

NSMutableAttributedString declares the programmatic interface to objects that manage mutable attributed strings.

NSTextStorage

NSTextStorage is a semiconcrete subclass of NSMutableAttributedString that manages a set of client NSLayoutManager objects, notifying them of any changes to its characters or attributes so that they can relay and redisplay the text as needed.

CAOpenGLLayer

CAOpenGLLayer provides a layer suitable for rendering OpenGL content.

NSOpenGLLayer

NSOpenGLLayer is a subclass of CAOpenGLLayer that is suitable for rendering OpenGL into layers.

Protocols

Protocol

Abstract

NSAccessibility

This protocol declares the complete list of properties and methods implemented by accessible elements.

NSAccessibility Informal

NSAccessibilityButton

This role-based protocol declares the minimum interface required for an accessibility element to act as a button.

NSAccessibilityCheckBox

This role-based protocol declares the minimum interface required for an accessibility element to act as a check box.

NSAccessibilityContainsTransientUI

This protocol should be used in addition to another role-based protocol.

NSAccessibilityElement

This role-based protocol declares the minimum interface required to interact with an accessibility client.

NSAccessibilityGroup

This role-based protocol declares the minimum interface required to act as a container for other user interface elements.

NSAccessibilityImage

This role-based protocol declares the minimum interface required for an accessibility element to act as a image.

NSAccessibilityLayoutArea

This role-based protocol declares the minimum interface required for an accessibility element to act as a layout area.

NSAccessibilityLayoutItem

This role-based protocol declares the minimum interface required for an accessibility element to act as a layout item.

NSAccessibilityList

This role-based protocol declares the minimum interface required for an accessibility element to act as a list view.

NSAccessibilityNavigableStaticText

This role-based protocol declares the minimum interface required for an accessibility element to act as navigable static text.

NSAccessibilityOutline

This role-based protocol declares the minimum interface required for an accessibility element to act as an outline view.

NSAccessibilityProgressIndicator

This role-based protocol declares the minimum interface required for an accessibility element to act as a progress indicator.

NSAccessibilityRadioButton

This role-based protocol declares the minimum interface required for an accessibility element to act as a radio button.

NSAccessibilityRow

This role-based protocol declares the minimum interface required for an accessibility element to act as a row for a table, list our outline view.

NSAccessibilitySlider

This role-based protocol declares the minimum interface required for an accessibility element to act as a slider.

NSAccessibilityStaticText

This role-based protocol declares the minimum interface required for an accessibility element to act as static text.

NSAccessibilityStepper

This role-based protocol declares the minimum interface required for an accessibility element to act as a stepper.

NSAccessibilitySwitch

This role-based protocol declares the minimum interface required for an accessibility element to act as a switch.

NSAccessibilityTable

This role-based protocol declares the minimum interface required for an accessibility element to act as a table view.

NSAlertDelegate

The NSAlertDelegate protocol defines the optional methods implemented by delegates of NSAlert objects.

NSAnimatablePropertyContainer

The NSAnimatablePropertyContainer protocol defines a way to add animation to an existing class with a minimum of API impact.

NSAnimationDelegate

The NSAnimationDelegate protocol defines the optional methods implemented by delegates of NSAnimation objects.

NSAppearanceCustomization

Use the NSAppearanceCustomization protocol to get or set the appearance of a view, or to get the appearance that an offscreen view will use when it draws onscreen in the future.

NSApplicationDelegate

The NSApplicationDelegate protocol defines the methods that may be implemented by delegates of NSApplication objects.

NSBrowserDelegate

The NSBrowserDelegate protocol defines the method that a delegate of NSBrowser should implement.

NSChangeSpelling

This protocol is implemented by objects in the responder chain that can correct a misspelled word.

NSCollectionViewDelegate

The NSCollectionViewDelegate protocol defines the optional methods implemented by delegates of NSCollectionView objects.

NSColorPickingCustom

Together with the NSColorPickingDefault protocol, NSColorPickingCustom provides a way to add color pickers—custom user interfaces for color selection—to an application’s NSColorPanel instance.

NSColorPickingDefault

The NSColorPickingDefault protocol, together with the NSColorPickingCustom protocol, provides an interface for adding color pickers—custom user interfaces for color selection—to an application’s NSColorPanel instance.

NSComboBoxCellDataSource

The NSComboBoxCellDataSource protocol declares the methods that an NSComboBoxCell uses to access the contents of its data source object.

NSComboBoxDataSource

The NSComboBoxDataSource informal protocol declares the methods that an NSComboBox object uses to access the contents of its data source object.

NSComboBoxDelegate

The NSComboBoxDelegate protocol defines the optional methods implemented by delegates of NSComboBox objects.

NSControlTextEditingDelegate

The NSControlTextEditingDelegate protocol defines the optional methods implemented by delegates of objects that are subclasses of NSControl.

NSDatePickerCellDelegate

The NSDatePickerCellDelegate protocol defines the optional methods implemented by delegates of NSDatePickerCell objects.

NSDictionaryControllerKeyValuePair

NSDockTilePlugIn

The NSDockTilePlugIn protocol defines the methods implemented by plug-ins that allow an application’s Dock tile to be customized while the application is not running.

NSDraggingDestination

The NSDraggingDestination protocol declares methods that the destination object (or recipient) of a dragged image must implement.

NSDraggingInfo

The NSDraggingInfo protocol declares methods that supply information about a dragging session.

NSDraggingSource

The NSDraggingSource protocol declares methods that are implemented by the source object in a dragging session.

NSDrawerDelegate

The NSDrawerDelegate protocol defines the messages sent to delegates of NSDrawer.

NSEditor

NSEditorRegistration

NSFontPanelValidation

NSGlyphStorage

The NSGlyphStorage protocol defines the methods that a glyph storage object must implement in order to interact properly with NSGlyphGenerator.

NSIgnoreMisspelledWords

Implement this protocol to have the Ignore button in the Spelling panel function properly.

NSImageDelegate

The NSImageDelegate protocol defines the optional methods implemented by delegates of NSImage objects.

NSKeyValueBindingCreation

NSLayerDelegateContentsScaleUpdating

NSLayoutManagerDelegate

The NSLayoutManagerDelegate protocol defines the optional methods implemented by delegates of NSLayoutManager objects.

NSMatrixDelegate

The NSMatrixDelegate protocol defines the optional methods implemented by delegates of NSMatrix objects.

NSMenuDelegate

The NSMenuDelegate protocol defines the optional methods implemented by delegates of NSMenu objects.

NSMenuValidation

NSNibAwaking

NSOpenSavePanelDelegate

The NSOpenSavePanelDelegate protocol defines the methods that a delegate of NSOpenPanel or NSSavePanel should implement.

NSOutlineViewDataSource

NSOutlineView objects support a data source delegate in addition to the regular delegate object.

NSOutlineViewDelegate

The NSOutlineViewDelegate protocol defines the optional methods implemented by delegates of NSOutlineView objects.

NSPageControllerDelegate

The NSPageControllerDelegate protocol allows you to customize the behavior of instances of the NSPageController class.

NSPasteboardItemDataProvider

This protocol is implemented by the data provider of a pasteboard item to provide the data for a particular UTI type.

NSPasteboardReading

The NSPasteboardReading protocol specifies the interface for initializing an object from a pasteboard.

NSPasteboardWriting

The NSPasteboardWriting protocol specifies the interface for retrieving a representation of an object that can be written to a pasteboard.

NSPathCellDelegate

The NSPathCellDelegate optional protocol enables the delegate of an NSPathCell object to customize the Open panel or pop-up menu of a path whose style is set to NSPathStylePopUp.

NSPathControlDelegate

The NSPathControlDelegate optional protocol is implemented by the delegate of an NSPathControl object to support dragging to and from the control.

NSPlaceholders

NSPopoverDelegate

The NSPopoverDelegate protocol defines optional methods that can be implemented by an NSPopover delegate class to provide additional or custom functionality.

NSPrintPanelAccessorizing

The NSPrintPanelAccessorizing protocol declares two methods that the NSPrintPanel class uses to get information from a printing accessory controller.

NSRuleEditorDelegate

The NSRuleEditorDelegate protocol defines the optional methods implemented by delegates of NSRuleEditor objects.

NSSeguePerforming

Implement the methods in the segue performing protocol to mediate a custom segue.

NSServicesMenuRequestor

This informal protocol consists of two methods, writeSelectionToPasteboard:types: and readSelectionFromPasteboard:.

NSSharingServiceDelegate

The NSSharingServiceDelegate protocol allows customization of the position and animation of the share sheet as well as be notified of the success or failure of the item being shared.

NSSharingServicePickerDelegate

The NSSharingServicePickerDelegate protocol allows customization of the service picker behavior.

NSSoundDelegate

The NSSoundDelegate protocol defines the optional methods implemented by delegates of NSSound objects.

NSSpeechRecognizerDelegate

The NSSpeechRecognizerDelegate protocol defines the optional methods implemented by delegates of NSSpeechRecognizer objects.

NSSpeechSynthesizerDelegate

The NSSpeechSynthesizerDelegate protocol defines the optional methods implemented by delegates of NSSpeechSynthesizer objects.

NSSplitViewDelegate

The NSSplitViewDelegate protocol defines the optional methods implemented by delegates of NSSplitView objects.

NSStackViewDelegate

To configure a custom class to respond to a view detaching from, or reattaching to, a stack view (an instance of the NSStackView class), configure the custom class to adopt the NSStackViewDelegate protocol.

NSTabViewDelegate

The NSTabViewDelegate protocol defines the optional methods implemented by delegates of NSTabView objects.

NSTableViewDataSource

The NSTableViewDataSource protocol declares the methods that an instance of NSTableView uses to provide the data to a table view and allow editing of the contents of its data source object.

NSTableViewDelegate

The NSTableViewDelegate protocol defines the optional methods implemented by delegates of NSTableView objects.

NSTextAttachmentCell

The NSTextAttachmentCell protocol declares the interface for objects that draw text attachment icons and handle mouse events on their icons.

NSTextDelegate

The NSTextDelegate protocol defines the optional methods implemented by delegates of NSText objects.

NSTextFieldDelegate

The NSTextFieldDelegate protocol adopts the NSControlTextEditingDelegate protocol and currently does not extend it further.

NSTextFinderBarContainer

The NSTextFindBarContainer protocol provides a container in which the find bar is displayed.

NSTextFinderClient

The NSTextFinderClient protocol is implemented by objects that wish to support searching using the NSTextFinder class and the in-window text finder bar.

NSTextInput

The NSTextInput protocol defines the methods that Cocoa text views must implement in order to interact properly with the text input management system.

NSTextInputClient

The NSTextInputClient protocol defines the methods that Cocoa text views must implement in order to interact properly with the text input management system.

NSTextLayoutOrientationProvider

The NSTextLayoutOrientationProvider protocol defines the default value for the range of string laid out in the receiver in absence of explicit NSVerticalGlyphFormAttributeName attribute.

NSTextStorageDelegate

The NSTextStorageDelegate protocol defines the optional methods implemented by delegates of NSTextStorage objects.

NSTextViewDelegate

The NSTextViewDelegate protocol defines the optional methods implemented by delegates of NSTextView objects.

NSTokenFieldCellDelegate

The NSTokenFieldCellDelegate protocol defines the optional methods implemented by delegates of NSTokenFieldCell objects.

NSTokenFieldDelegate

The NSTokenFieldDelegate protocol defines the optional methods implemented by delegates of NSTokenField objects.

NSToolTipOwner

NSToolbarDelegate

The NSToolbarDelegate protocol defines the optional methods implemented by delegates of NSToolbar objects.

NSToolbarItemValidation

NSUserInterfaceItemIdentification

The NSUserInterfaceItemIdentification protocol is used to associate a unique identifier with objects in your user interface.

NSUserInterfaceItemSearchDataSource

NSUserInterfaceItemSearching

The NSUserInterfaceItemSearching protocol show an application can implement Spotlight for Help for their own custom help data.

NSUserInterfaceValidations

The NSUserInterfaceValidations protocol works with the NSValidatedUserInterfaceItem protocol to allow the target of a user interface element such as a menu item or a toolbar item to decide whether or not the user interface element should be enabled.

NSValidatedUserInterfaceItem

The NSValidatedUserInterfaceItem protocol works with the NSUserInterfaceValidations protocol to enable or disable a control automatically, depending on whether any responder in the responder chain can handle the control’s action method.

NSViewControllerPresentationAnimator

The view controller presentation animator protocol lets you define animations to play when transitioning between two view controllers.

NSWindowDelegate

The NSWindowDelegate protocol defines the methods that a delegate of NSWindow should implement.

NSWindowRestoration

The NSWindowRestoration protocol defines the method that restoration classes must implement to handle the recreation of windows.

NSWindowScripting

Other Reference

Reference

CIColor Additions Reference

CIImage Additions Reference

NSAppleScript AppKit Additions Reference

NSAttributedString AppKit Additions Reference

NSBundle AppKit Additions Reference

NSCoder AppKit Additions Reference

NSFileWrapper AppKit Additions Reference

NSMutableAttributedString Additions Reference

NSString Application Kit Additions Reference

NSURL Additions Reference

AppKit Functions Reference

AppKit Data Types Reference

AppKit Constants Reference