<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPopoverPresentationController/sourceRect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPopoverPresentationController(py)sourceRect"
  },
  "title" : "sourceRect"
}
-->

# sourceRect

The area in the source view in which you anchor the popover.

```
var sourceRect: CGRect { get set }
```

## Discussion

Use this property to define the rectangle that the popover’s arrow points to. The rectangle must be in the coordinate space of [`sourceView`](/documentation/UIKit/UIPopoverPresentationController/sourceView).

In iOS 13.2 and later, the default value is <doc://com.apple.documentation/documentation/CoreGraphics/CGRectNull>, which instructs the system to use the current frame of [`sourceView`](/documentation/UIKit/UIPopoverPresentationController/sourceView). The controller observes changes to this frame and updates the popover accordingly.

In iOS 13.1 and earlier, the default value is <doc://com.apple.documentation/documentation/CoreFoundation/CGRect/zero> (Swift) or <doc://com.apple.documentation/documentation/CoreGraphics/CGRectZero> (Objective-C); using <doc://com.apple.documentation/documentation/CoreGraphics/CGRectNull> results in undefined behavior.

[`UIPopoverPresentationController`](/documentation/UIKit/UIPopoverPresentationController) ignores this property if you set the [`barButtonItem`](/documentation/UIKit/UIPopoverPresentationController/barButtonItem) property.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)