Contents

sourceItem

The item on which to anchor the popover.

Declaration

var sourceItem: (any UIPopoverPresentationControllerSourceItem)? { get set }

Mentioned in

Discussion

Assign a value to this property to anchor the popover to the specified UIBarButtonItem or NSToolbarItem. In iOS 18 and earlier, the popover’s arrow points to the specified item. In iOS 26 and later, the popover animates from and replaces the specified item until someone selects an action item or dismisses the popover.

Alternatively, you may specify the anchor location for the popover using the sourceView and sourceRect properties.

The default value of this property is nil.

See Also

Specifying the popover’s anchor point