App Windows

Show, hide, minimize, arrange, and update your app's windows.


Managing App Windows


The window that currently receives keyboard events.


The app’s main window.

- windowWithWindowNumber:

Returns the window corresponding to the specified window number.


An array of the app’s window objects.

- makeWindowsPerform:inOrder:

Sends the specified message to each of the app’s window objects until one returns a non-nil value.

- enumerateWindowsWithOptions:usingBlock:

Executes a block for each of the app's windows.


This constant indicates a window ordering.

Minimizing Windows

- miniaturizeAll:

Miniaturizes all the receiver’s windows.

Hiding Windows


A Boolean value indicating whether the app is hidden.

- hide:

Hides all the receiver’s windows, and the next app in line is activated.

- unhide:

Restores hidden windows to the screen and makes the receiver active.

- unhideWithoutActivation

Restores hidden windows without activating their owner (the receiver).

Updating Windows

- updateWindows

Sends an update message to each onscreen window.

- setWindowsNeedUpdate:

Sets whether the receiver’s windows need updating when the receiver has finished processing the current event.

Managing Window Layers

- preventWindowOrdering

Suppresses the usual window ordering in handling the most recent mouse-down event.

- arrangeInFront:

Arranges windows listed in the Window menu in front of all other windows.

Drawing Windows


The graphics context associated with the app.


Getting the Occlusion State


The occlusion state of the app.


This constant indicates whether at least part of any window owned by this app is visible.

Restoring App Windows at Launch

- extendStateRestoration

Allows an app to extend its state restoration period.

- completeStateRestoration

Completes the extended state restoration.

- restoreWindowWithIdentifier:state:completionHandler:

Invoked to request that a window be restored.

Managing Run Loops


The priority at which windows are displayed.


The priority at which cursor rects are reset.

See Also

Managing Windows, Panels, and Menus

Modal Windows and Panels

Display a modal window or show one of the standard app panels, such as the app's About panel.


Access the app's main menu items and update the window and services menus.