Instance Method

showWindow(_:)

Displays the window associated with the receiver.

Declaration

@IBAction func showWindow(_ sender: Any?)

Parameters

sender

The control sending the message; can be nil.

Discussion

If the window is an NSPanel object and has its becomesKeyOnlyIfNeeded flag set to true, the window is displayed in front of all other windows but is not made key; otherwise it is displayed in front and is made key. This method is useful for menu actions.

See Also

Loading and Displaying the Window

func loadWindow()

Loads the receiver’s window from the nib file.

var isWindowLoaded: Bool

A Boolean value that indicates whether the nib file containing the receiver’s window has been loaded.

var window: NSWindow?

The window owned by the receiver.

func windowDidLoad()

Sent after the window owned by the receiver has been loaded.

func windowWillLoad()

Sent before the window owned by the receiver is loaded.