sourceRect
The area in the source view in which you anchor the popover.
Declaration
var sourceRect: CGRect { get set }Mentioned in
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.
In iOS 13.2 and later, the default value is CGRectNull, which instructs the system to use the current frame of sourceView. The controller observes changes to this frame and updates the popover accordingly.
In iOS 13.1 and earlier, the default value is zero (Swift) or CGRectZero (Objective-C); using CGRectNull results in undefined behavior.
UIPopoverPresentationController ignores this property if you set the barButtonItem property.