---
title: "present(from:in:permittedArrowDirections:animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipopovercontroller/present(from:in:permittedarrowdirections:animated:)"
---

# present(from:in:permittedArrowDirections:animated:)

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

## Declaration

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

## Parameters

- `rect`: The rectangle in view at which to anchor the popover window.
- `view`: The view containing the anchor rectangle for the popover.
- `arrowDirections`: 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 doc://com.apple.uikit/documentation/UIKit/UIPopoverArrowDirection/any and let the popover decide the best placement. You must not specify doc://com.apple.uikit/documentation/UIKit/UIPopoverArrowDirection/unknown for this parameter.
- `animated`: Specify doc://com.apple.documentation/documentation/Swift/true to animate the presentation of the popover or doc://com.apple.documentation/documentation/Swift/false to display it immediately.

## See Also

### Presenting and dismissing the popover

- [present(from:permittedArrowDirections:animated:)](uikit/uipopovercontroller/present(from:permittedarrowdirections:animated:).md)
- [dismiss(animated:)](uikit/uipopovercontroller/dismiss(animated:).md)
