---
title: didBecomeKeyNotification
framework: uikit
role: symbol
role_heading: Type Property
path: uikit/uiwindow/didbecomekeynotification
---

# didBecomeKeyNotification

A notification that posts whenever a window becomes the key window.

## Declaration

```swift
nonisolated class let didBecomeKeyNotification: NSNotification.Name
```

## Discussion

Discussion The notification object is the window that became key. This notification doesn’t contain a userInfo dictionary. The system posts this notification on the main actor. In iOS 15 and later, the system posts this notification when the window becomes the key window of its scene. In iOS 14 and earlier, the system posts this notification when the window becomes the key window of the app.

## See Also

### Responding to window-related notifications

- [didBecomeVisibleNotification](uikit/uiwindow/didbecomevisiblenotification.md)
- [didBecomeHiddenNotification](uikit/uiwindow/didbecomehiddennotification.md)
- [didResignKeyNotification](uikit/uiwindow/didresignkeynotification.md)
