Instance Property

barButtonItem

The bar button item on which to anchor the popover.

Declaration

@property(nonatomic, strong) UIBarButtonItem *barButtonItem;

Discussion

Assign a value to this property to anchor the popover to the specified bar button item. When presented, the popover’s arrow points to the specified item. Alternatively, you may specify the anchor location for the popover using the sourceView and sourceRect properties.

Prior to presentation, the presentation controller adds all sibling bar button items of the specified item (but not the item itself) to the popover’s list of passthrough views. UIKit automatically intercepts taps in the specified item and uses them to dismiss the popover. If you want taps in the other bar button items to dismiss the popover, you must add code to the action handlers of those items to do so yourself.

The default value of this property is nil.

See Also

Specifying the Popover’s Anchor Point

sourceView

The view containing the anchor rectangle for the popover.

sourceRect

The rectangle in the specified view in which to anchor the popover.