Views and Controls

Present your content onscreen and define the interactions allowed with that content.


View Fundamentals

class NSView

The infrastructure for drawing, printing, and handling events in an app.

class NSControl

A definition of the fundamental behavior for controls, which are specialized views that notify your app of relevant events by using the target-action design pattern.

class NSCell

A mechanism for displaying text or images in a view object without the overhead of a full NSView subclass.

class NSActionCell

An active area inside a control.

Container Views

Use container views to arrange the views of your interface and to facilitate navigation among those views.

Grid View

Arrange views in a flexible grid, and handle the layout associated with those views.

class NSSplitView

A view that arranges two or more views in a linear stack running horizontally or vertically.

Organize Your User Interface with a Stack View

Group individual views in your app’s user interface into a scrollable stack view.

class NSStackView

A view that arranges an array of views horizontally or vertically and updates their placement and sizing when the window size changes.

class NSTabView

A multipage interface that displays one page at a time.

Scroll View

Provide an interface for navigating content that is too large to fit in the available space.

Content Views

Use content views to organize and display your app's data.

Browser View

Provide a column-based interface for viewing and navigating hierarchical information.

Collection View

Display one or more subviews in a highly configurable arrangement.

Outline View

Display a list-based interface for hierarchical data, where each level of hierarchy is indented from the previous one.

Table View

Display custom data in rows and columns.

class NSTextView

A view that draws text and handles user interactions with that text.

class NSOpenGLView

A view that displays OpenGL content in a view.



Use controls to handle specific types of user interactions. Controls are specialized views that use the target-action design pattern to notify your app of interactions with their content.

class NSButton

A control that defines an area on the screen that can be used to trigger actions.

class NSColorWell

A control that displays a color value and lets the user change that color value.

Date Picker

Display a calendar date and provide controls for editing the date value.

class NSImageView

A display of image data from an NSImage object in a frame.

class NSLevelIndicator

A visual representation of a level or quantity, using discrete values.

Path Control

A display of a file system path or virtual path information.

class NSPopUpButton

A control for selecting an item from a list.

class NSProgressIndicator

An interface that provides visual feedback to the user about the status of an ongoing task.

class NSRuleEditor

An interface for configuring a rule-based list of options.

class NSPredicateEditor

A defined set of rules that allows the editing of predicate objects.

Search Field

Provide a text field that is optimized for text-based search interfaces.

class NSSegmentedControl

Display one or more buttons in a single horizontal group.


Display a range of values from which the user selects a single value.

class NSStepper

An interface with up and down arrow buttons for incrementing or decrementing a value.

Text Field

Provide a simple interface for displaying and editing text, including support for password fields and secure forms of text entry.

Token Field

Provide a text field whose text can be rendered in a visually distinct way so that users can recognize portions more easily.


Provide a space for controls under a window's title bar and above your custom content.

Combo Box

Display a list of values in a pop-up menu that lets the user select a value or type in a custom value.

class NSMatrix

A legacy interface for grouping radio buttons or other types of cells together.

class NSSwitch

A control that offers a binary choice.

View Layout

protocol NSUserInterfaceCompression

A protocol that describes how a UI control should redisplay when space is restricted.

Visual Adornments

Add purely decorative elements to your user interface.

class NSVisualEffectView

A view that adds translucency and vibrancy effects to the views in your interface.

class NSBox

A stylized rectangular box with an optional title.

UI Validation

protocol NSUserInterfaceValidations

A protocol that a custom class can adopt to manage the enabled state of a UI element.

protocol NSValidatedUserInterfaceItem

A protocol that a custom class can adopt to manage the automatic enablement of a UI control.

Tool Tips

protocol NSViewToolTipOwner

A set of methods for dynamically associating a tool tip with a view.

See Also

User Interface

Supporting Continuity Camera in Your Mac App

Incorporate scanned documents and pictures taken with a user's iPhone, iPad, or iPod touch into your Mac app using Continuity Camera.

View Management

Manage your user interface, including the size and position of views in a window.

View Layout

Position and size views using a stack view or Auto Layout constraints.

Appearance Customization

Add Dark Mode support to your app, and use appearance proxies to modify your UI.


Animate your views and other content to create a more engaging experience for users.

Windows, Panels, and Screens

Organize your view hierarchies and facilitate their display onscreen.

Sound, Speech, and Haptics

Play sounds and haptic feedback, and incorporate speech recognition and synthesis into your interface.