Windows, Panels, and Screens

Organize your view hierarchies and facilitate their display onscreen.

Topics

Windows

class NSWindow

A window that an app displays on the screen.

class NSPanel

A special kind of window that typically performs a function that is auxiliary to the main window.

protocol NSWindowDelegate

A set of optional methods that a delegate of NSWindow can implement to respond to events, such as window resizing, moving, exposing, and minimizing.

Window Restoration

protocol NSWindowRestoration

A set of methods that restoration classes must implement to handle the recreation of windows.

protocol NSUserInterfaceItemIdentification

A set of methods used to associate a unique identifier with objects in your user interface.

Screens

class NSScreen

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

Popovers

class NSPopover

A means to display additional content related to existing content on the screen.

protocol NSPopoverDelegate

A set of optional methods that a popover delegate can implement to provide additional or custom functionality.

Alerts

class NSAlert

A modal dialog or sheet attached to a document window.

protocol NSAlertDelegate

A set of optional methods implemented by the delegate of an NSAlert object to respond to a user's request for help.

Open and Save Panels

class NSOpenPanel

The Open panel for the Cocoa user interface.

class NSSavePanel

A Save panel that you can run in a modal loop.

protocol NSOpenSavePanelDelegate

A set of methods that a delegate of NSOpenPanel or NSSavePanel should implement.

Print and PDF Panels

class NSPDFPanel

A Save or Export as PDF panel that’s consistent with the macOS user interface.

protocol NSPrintPanelAccessorizing

A set of methods that a print panel object can use to get information from a printing accessory controller.

Color Panels

class NSColorPanel

A standard user interface for selecting color in an app.

protocol NSColorPickingCustom

A set of methods that provides a way to add color pickers—custom user interfaces for color selection—to an app’s color panel.

protocol NSColorPickingDefault

A set of methods that provides basic behavior for a color picker.

class NSColorPicker

An abstract superclass that implements the NSColorPickingDefault protocol.

Font Panels

class NSFontPanel

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.

NSFontPanelValidation

A set of methods you use to tell the Font panel to display some or all of its elements.

See Also

User Interface

Supporting Dark Mode in Your Interface

Adopt a dark appearance in addition to the standard light appearance.

Views and Controls

Present and define the interactions for your content onscreen.

View Management

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

Menus, Cursors, and the Dock

Implement menus and cursors to facilitate interactions with your app, and use your app's Dock tile to convey updated information.

Touch Bar

Display interactive content and controls in the Touch Bar.

Animation

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

Sound, Speech, and Haptics

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