Since migration to Swift 5, popovers that have permittedArrowDirections set to .left/.right render slightly off-center from where they're supposed to be. However, when setting permittedArrowDirections to .top/.bottom, the problem goes away. Please see graphic below:
I set up the popover as follows:
let popoverController = colorPickerVC.popoverPresentationController
popoverController!.permittedArrowDirections = .right
popoverController!.sourceRect = CGRect(x: Constants.uiPopoverArrowHorizontallOffset2, y: self.buttonLayersPicker.frame.height/2 ,width: 0,height: 0) // anchor popover to middle-left of calling button
popoverController?.backgroundColor = Constants.uiColorPopupBgDark1 // set the color of the popover arrow
popoverController?.passthroughViews = [viewControllerMain.view] // allow interaction with bg view while popover is being displayed
// present popover
viewControllerMain.present(colorPickerVC, animated: true, completion: nil)
Has anyone come up against this issue? How to resolve?
Thanks in advance