Instance Property

isKeyWindow

A Boolean value that indicates whether the window is the key window for the app.

Declaration

var isKeyWindow: Bool { get }

Discussion

The value of this property is true when the window is the key window or false when it is not. The key window receives keyboard and other non-touch related events. Only one window at a time may be the key window.

See Also

Making Windows Key

func makeKeyAndVisible()

Shows the window and makes it the key window.

func makeKey()

Makes the receiver the key window.

func becomeKey()

Called automatically to inform the window that it has become the key window.

func resignKey()

Called automatically to inform the window that it is no longer the key window.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software