---
title: NSPopover
framework: appkit
role: symbol
role_heading: Class
path: appkit/nspopover
---

# NSPopover

A means to display additional content related to existing content on the screen.

## Declaration

```swift
class NSPopover
```

## Overview

Overview The popover is positioned relative to the existing content and an anchor is used to express the relation between these two units of content. A popover has an appearance that specifies its visual characteristics, as well as a behavior that determines which user interactions will cause the popover to close. A transient popover is closed in response to most user interactions, whereas a semi-transient popover is closed when the user interacts with the window containing the popover’s positioning view. Popovers with application-defined behavior are not usually closed on the developer’s behalf. The system automatically positions each popover relative to its positioning view and moves the popover whenever its positioning view moves. A positioning rectangle within the positioning view can be specified for additional granularity. Popovers can be detached to become a separate window when they are dragged by implementing the appropriate delegate method.

## Topics

### Accessing a Popover’s Content View Controller

- [contentViewController](appkit/nspopover/contentviewcontroller.md)

### Managing a Popover’s Position and Size

- [behavior](appkit/nspopover/behavior-swift.property.md)
- [show(relativeTo:of:preferredEdge:)](appkit/nspopover/show(relativeto:of:preferrededge:).md)
- [positioningRect](appkit/nspopover/positioningrect.md)

### Managing a Popover’s Appearance

- [appearance](appkit/nspopover/appearance-swift.property.md)
- [effectiveAppearance](appkit/nspopover/effectiveappearance.md)
- [animates](appkit/nspopover/animates.md)
- [contentSize](appkit/nspopover/contentsize.md)
- [isShown](appkit/nspopover/isshown.md)
- [isDetached](appkit/nspopover/isdetached.md)

### Closing a Popover

- [performClose(_:)](appkit/nspopover/performclose(_:).md)
- [close()](appkit/nspopover/close().md)

### Getting and Setting the Delegate

- [delegate](appkit/nspopover/delegate.md)

### Constants

- [NSPopover.Behavior](appkit/nspopover/behavior-swift.enum.md)
- [closeReasonUserInfoKey](appkit/nspopover/closereasonuserinfokey.md)
- [NSPopover.CloseReason](appkit/nspopover/closereason.md)
- [NSPopover.Appearance](appkit/nspopover/appearance-swift.enum.md)

### Notifications

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

### Initializers

- [init()](appkit/nspopover/init().md)
- [init(coder:)](appkit/nspopover/init(coder:).md)

### Instance Properties

- [hasFullSizeContent](appkit/nspopover/hasfullsizecontent.md)

### Instance Methods

- [show(relativeTo:)](appkit/nspopover/show(relativeto:).md)

### Structures

- [NSPopover.DidCloseMessage](appkit/nspopover/didclosemessage.md)
- [NSPopover.DidShowMessage](appkit/nspopover/didshowmessage.md)
- [NSPopover.WillCloseMessage](appkit/nspopover/willclosemessage.md)
- [NSPopover.WillShowMessage](appkit/nspopover/willshowmessage.md)

## Relationships

### Inherits From

- [NSResponder](appkit/nsresponder.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Popovers

- [NSPopoverDelegate](appkit/nspopoverdelegate.md)
