---
title: sourceView
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uipopoverpresentationcontroller/sourceview
---

# sourceView

The view containing the anchor rectangle for the popover.

## Declaration

```swift
var sourceView: UIView? { get set }
```

## Mentioned in

Getting the user’s attention with alerts and action sheets

## Discussion

Discussion Use this property in conjunction with the sourceRect property to specify the anchor location for the popover. Alternatively, you may specify the anchor location for the popover using the barButtonItem property.

## See Also

### Specifying the popover’s anchor point

- [sourceItem](uikit/uipopoverpresentationcontroller/sourceitem.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [sourceRect](uikit/uipopoverpresentationcontroller/sourcerect.md)
- [barButtonItem](uikit/uipopoverpresentationcontroller/barbuttonitem.md)
