<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPopoverBackgroundView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPopoverBackgroundView"
  },
  "title" : "UIPopoverBackgroundView"
}
-->

# UIPopoverBackgroundView

The background appearance for a popover.

```
class UIPopoverBackgroundView
```

## Overview

This class must be subclassed before it can be used. The implementation of your subclass is responsible for providing the border decoration and arrow for the popover. Subclasses must override all declared properties and methods to provide information about where to lay out the corresponding popover content and arrow. Subclasses must also provide implementations for all methods of the [`UIPopoverBackgroundViewMethods`](/documentation/UIKit/UIPopoverBackgroundViewMethods) protocol.

### Subclassing notes

Your subclass is responsible for providing the background visual styling of the popover, which includes the arrow and appropriately styled border. The popover controller places the actual popover content on top of your background view to finish the popover’s presentation.

The background contents of your view should be based on stretchable images. Because the popover is animated into place (and may require animated transitions), using images is the only way to ensure that the animations are smooth and not jittery. By creating images that can be stretched at appropriate places, your popover can still be resized and adjusted as needed. You can then incorporate those images using [`UIImageView`](/documentation/UIKit/UIImageView) subviews or Core Animation layers. When the size of the popover changes (perhaps to accommodate the keyboard), all you have to do is adjust the frame rectangles of your embedded image views.

> Note:
> The images you use for your popover background view shouldn’t contain any shadow effects. The popover controller adds a shadow to the popover for you.

In addition to providing the background content, your subclass must implement the [`arrowOffset`](/documentation/UIKit/UIPopoverBackgroundView/arrowOffset) and [`arrowDirection`](/documentation/UIKit/UIPopoverBackgroundView/arrowDirection) properties and the methods in the [`UIPopoverBackgroundViewMethods`](/documentation/UIKit/UIPopoverBackgroundViewMethods) protocol. The popover controller uses these methods and properties to get and set information related to your background view. The protocol methods are called once and the values you return should never change. However, the values in the [`arrowOffset`](/documentation/UIKit/UIPopoverBackgroundView/arrowOffset) and [`arrowDirection`](/documentation/UIKit/UIPopoverBackgroundView/arrowDirection) properties can change while your popover is on the screen, so your setter methods should call [`setNeedsLayout()`](/documentation/UIKit/UIView/setNeedsLayout()) when that happens to update the background image views or layers.

To create a stretchable image, use the [`resizableImage(withCapInsets:)`](/documentation/UIKit/UIImage/resizableImage(withCapInsets:)) method of [`UIImage`](/documentation/UIKit/UIImage).

## Topics

### Accessing the arrow metrics

[`arrowOffset`](/documentation/UIKit/UIPopoverBackgroundView/arrowOffset)

The distance (measured in points) from the center of the view to the center line of the arrow.

[`arrowDirection`](/documentation/UIKit/UIPopoverBackgroundView/arrowDirection)

The direction in which the popover arrow is pointing.

### Controlling the popover appearance

[`wantsDefaultContentAppearance`](/documentation/UIKit/UIPopoverBackgroundView/wantsDefaultContentAppearance)

Determines whether the default content appearance should be used for the popover.

## Relationships

### Conforms To

[`CMBodyIdentifiable`](/documentation/CoreMotion/CMBodyIdentifiable)

[`CALayerDelegate`](/documentation/QuartzCore/CALayerDelegate)

[`Equatable`](/documentation/Swift/Equatable)

[`UILargeContentViewerItem`](/documentation/UIKit/UILargeContentViewerItem)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`CLBodyIdentifiable`](/documentation/CoreLocation/CLBodyIdentifiable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`UIPopoverBackgroundViewMethods`](/documentation/UIKit/UIPopoverBackgroundViewMethods)

[`UICoordinateSpace`](/documentation/UIKit/UICoordinateSpace)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UIAppearance`](/documentation/UIKit/UIAppearance)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`UIFocusItem`](/documentation/UIKit/UIFocusItem)

[`UIAccessibilityIdentification`](/documentation/UIKit/UIAccessibilityIdentification)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`UIPopoverPresentationControllerSourceItem`](/documentation/UIKit/UIPopoverPresentationControllerSourceItem)

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`UIFocusItemContainer`](/documentation/UIKit/UIFocusItemContainer)

[`UIDynamicItem`](/documentation/UIKit/UIDynamicItem)

[`CVarArg`](/documentation/Swift/CVarArg)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

### Inherits From

[`UIView`](/documentation/UIKit/UIView)

---

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)