Instance Method

makeWindowsPerform(_:inOrder:)

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

Declaration

func makeWindowsPerform(_ selector: Selector, inOrder flag: Bool) -> NSWindow?

Parameters

aSelector

The selector to perform on each window. This method must not take any arguments and must return a value whose type that can be compared to nil.

flag

If true, the aSelector message is sent to each of the window server’s onscreen windows, going in z-order, until one returns a non-nil value. A minimized window is not considered to be onscreen for this check. If false, the message is sent to all windows in NSApp’s window list, regardless of whether or not they are onscreen. This order is unspecified.

Return Value

The window that returned a non-nil value or nil if all windows returned nil from aSelector.

See Also

Managing App Windows

var keyWindow: NSWindow?

The window that currently receives keyboard events.

var mainWindow: NSWindow?

The app’s main window.

func window(withWindowNumber: Int) -> NSWindow?

Returns the window corresponding to the specified window number.

var windows: [NSWindow]

An array of the app’s window objects.

struct NSApplication.WindowListOptions

This constant indicates a window ordering.