Contents

becomeKey()

Tells the window that it’s the key window.

Declaration

func becomeKey()

Discussion

Never call this method directly. The system calls this method and posts didBecomeKeyNotification to let the window know that it’s the key window. The default implementation of this method does nothing, but subclasses can override it and use it to perform tasks related to becoming the key window.

In iOS 15 and later, the system calls this method when the window becomes the key window in its scene. In iOS 14 and earlier, the system calls this method when the window becomes the key window in the app.

See Also

Making windows key