Instance Method


Allows a delegate to override a close request.


optional func popoverShouldClose(_ popover: NSPopover) -> Bool



The popover.

Return Value

true if the popover should close, false otherwise.


The popover invokes this method on its delegate whenever it is about to close. This gives the delegate a chance to override the close.

If there is no delegate or the delegate does not implement this method the default behavior is that the popover will close.

See Also

Popover Visibility

func popoverWillShow(Notification)

Invoked when the popover will show.

func popoverDidShow(Notification)

Invoked when the popover has been shown.

func popoverWillClose(Notification)

Invoked when the popover is about to close.

func popoverDidClose(Notification)

Invoked when the popover did close.

func popoverDidDetach(NSPopover)

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

func popoverShouldDetach(NSPopover) -> Bool

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