---
title: UIPopoverBackgroundView
framework: uikit
role: symbol
role_heading: Class
path: uikit/uipopoverbackgroundview
---

# UIPopoverBackgroundView

The background appearance for a popover.

## Declaration

```swift
class UIPopoverBackgroundView
```

## Overview

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 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 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 and arrowDirection properties and the methods in the 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 and arrowDirection properties can change while your popover is on the screen, so your setter methods should call setNeedsLayout() when that happens to update the background image views or layers. To create a stretchable image, use the resizableImage(withCapInsets:) method of UIImage.

## Topics

### Accessing the arrow metrics

- [arrowOffset](uikit/uipopoverbackgroundview/arrowoffset.md)
- [arrowDirection](uikit/uipopoverbackgroundview/arrowdirection.md)

### Controlling the popover appearance

- [wantsDefaultContentAppearance](uikit/uipopoverbackgroundview/wantsdefaultcontentappearance.md)

## Relationships

### Inherits From

- [UIView](uikit/uiview.md)

### Conforms To

- [CALayerDelegate](quartzcore/calayerdelegate.md)
- [CLBodyIdentifiable](corelocation/clbodyidentifiable.md)
- [CMBodyIdentifiable](coremotion/cmbodyidentifiable.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIAccessibilityIdentification](uikit/uiaccessibilityidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearance](uikit/uiappearance.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIDynamicItem](uikit/uidynamicitem.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UILargeContentViewerItem](uikit/uilargecontentvieweritem.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIPopoverBackgroundViewMethods](uikit/uipopoverbackgroundviewmethods.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Popovers

- [Displaying transient content in a popover](uikit/displaying-transient-content-in-a-popover.md)
- [UIPopoverPresentationController](uikit/uipopoverpresentationcontroller.md)
- [UIPopoverBackgroundViewMethods](uikit/uipopoverbackgroundviewmethods.md)
