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

# NSPopoverDelegate

A set of optional methods that a popover delegate can implement to provide additional or custom functionality.

```
protocol NSPopoverDelegate : NSObjectProtocol
```

## Overview

See [`NSPopover`](/documentation/AppKit/NSPopover) for more information on popovers in general.

## Topics

### Popover Window

[`detachableWindow(for:)`](/documentation/AppKit/NSPopoverDelegate/detachableWindow(for:))

Detaches the popover creating a window containing the content.

### Popover Visibility

[`popoverShouldClose(_:)`](/documentation/AppKit/NSPopoverDelegate/popoverShouldClose(_:))

Allows a delegate to override a close request.

[`popoverWillShow(_:)`](/documentation/AppKit/NSPopoverDelegate/popoverWillShow(_:))

Invoked when the popover will show.

[`popoverDidShow(_:)`](/documentation/AppKit/NSPopoverDelegate/popoverDidShow(_:))

Invoked when the popover has been shown.

[`popoverWillClose(_:)`](/documentation/AppKit/NSPopoverDelegate/popoverWillClose(_:))

Invoked when the popover is about to close.

[`popoverDidClose(_:)`](/documentation/AppKit/NSPopoverDelegate/popoverDidClose(_:))

Invoked when the popover did close.

[`popoverDidDetach(_:)`](/documentation/AppKit/NSPopoverDelegate/popoverDidDetach(_:))

Indicates that a popover has been released while it’s in an implicitly detached state.

[`popoverShouldDetach(_:)`](/documentation/AppKit/NSPopoverDelegate/popoverShouldDetach(_:))

Returns a Boolean value that indicates whether a popover should detach from its positioning view and become a separate window.



---

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)