I'm setting the properties for a UIAlertController like so:
alertController.modalPresentationStyle = .popover
alertController.popoverPresentationController?.sourceView = sourceView
alertController.popoverPresentationController?.sourceRect = sourceView.bounds
Presenting this alertController on an iPad displays a popover as expected, with the tip of the popover arrow in the exact centre of the sourceView, as expected. However, this covers up part of the content of my sourceView. Is there something I can do so that content won't be covered? For example if the arrow is pointing down, the arrow tip will be at the top of my sourceView. And if the arrow is pointing up, the arrow tip will be at the bottom of my sourceView. I could manipulate the sourceRect, but I can't know ahead of time what the arrow direction is going to be.
 
    