---
title: willCloseNotification
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nspopover/willclosenotification
---

# willCloseNotification

Sent before the popover is closed.

## Declaration

```swift
class let willCloseNotification: NSNotification.Name
```

## Discussion

Discussion The userInfo key closeReasonUserInfoKey specifies the reason for closing. It can currently be either standard or detachToWindow, although more reasons for closing may be added in the future. To observe this notification using Swift concurrency, use NSPopover.WillCloseMessage.

## See Also

### Notifications

- [willShowNotification](appkit/nspopover/willshownotification.md)
- [didShowNotification](appkit/nspopover/didshownotification.md)
- [didCloseNotification](appkit/nspopover/didclosenotification.md)
