I'm trying to change the default popover arrow color for a popover defined as a storyboard segue (not built programmatically) from a button. The following picture shows the white default popover arrow:
When I add
navigationController?.popoverPresentationController?.backgroundColor = myNavBarColor
to the viewWillAppear method of the UIViewController presented in the popover, the result is the following:
Defining a new UIPopoverBackgroundView class for the UIPopoverPresentationController during the prepareForSegue method of the main UIViewController is "too late".
I hope there'll be a simple fix (with the same storyboard segue as popover) for such a common issue.


prepareForSegue. Like thissegue.destinationViewController.popoverPresentationController.backgroundColor. - gabblersegue.destination.modalPresentationStyle = .popover, otherwisesegue.destination.popoverPresentationControllerwould benil. Apart from that, the solutions works fine. - iStefo