<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPopoverDelegate/popoverWillClose(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSPopoverDelegate(im)popoverWillClose:"
  },
  "title" : "popoverWillClose(_:)"
}
-->

# popoverWillClose(_:)

Invoked when the popover is about to close.

```
@MainActor optional func popoverWillClose(_ notification: Notification)
```

## Discussion

Invoked on the delegate when the [`willCloseNotification`](/documentation/AppKit/NSPopover/willCloseNotification) notification is sent.

This method will also be invoked on the delegate’s popover, if the method has been implemented.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)