Instance Method


Displays the popover and anchors it to the specified location in the view.


func present(from rect: CGRect, in view: UIView, permittedArrowDirections arrowDirections: UIPopoverArrowDirection, animated: Bool)



The rectangle in view at which to anchor the popover window.


The view containing the anchor rectangle for the popover.


The arrow directions the popover is permitted to use. You can use this value to force the popover to be positioned on a specific side of the rectangle. However, it is generally better to specify any and let the popover decide the best placement. You must not specify unknown for this parameter.


Specify true to animate the presentation of the popover or false to display it immediately.

See Also

Presenting and Dismissing the Popover

func present(from: UIBarButtonItem, permittedArrowDirections: UIPopoverArrowDirection, animated: Bool)

Displays the popover and anchors it to the specified bar button item.

func dismiss(animated: Bool)

Dismisses the popover programmatically.


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software