shiny
shiny

Reputation: 21

Changing the iOS 13 UIPopoverPresentationController blur and shadow amount?

The appearance of the modal popover view shown by the UIPopoverPresentationController in iOS 13 has changed significantly from how it looked in iOS 12. The base color is darker, the shadowing of the background is different, and the amount of blurring of the background under the popover is very different.

If I was setting the background of my popover content to a solid, non-alpha-transparent color, I wouldn't have any issues, but I am, and I cannot figure out how to access the view/layer which my content is being displayed in to change things.

Setting the backgroundColor of the UIPopoverPresentationController to something completely transparent (alpha = 0.0) doesn't give me a completely transparent popover. I implemented a UIPopoverPresentationControllerDelegate and tried to use the prepareForPopoverPresentation: method to access the view the popover content is inside of, and make modifications, but I can't seem to find it: superview() is nil, and the UIPopoverPresentationController.presentedView() is also nil (at least they are when that delegate method is called). The UIPopoverPresentationController.containerView() is not nil, and definitely is the overlay view in which the popover is displayed...but that isn't the view I'm looking for.

So...I'm wondering what I'm missing here. I would very much prefer not to have to implement my own UIPopoverBackgroundView as the popoverBackgroundViewClass though I know that is a possibility.

Upvotes: 2

Views: 370

Answers (0)

Related Questions