UIPopoverPresentationController background broken?

With iOS 9, I had a problem with the background of the UIPopoverPresentationController. It seems that the shape and color are broken.

In the code below, I define a popover in the prepareForSegue function, and I set its preferred content size and background color. The size is displayed correctly, but with some errors in the form of a background image. Also, the color is not set (the arrow and the broken shape are white, not dark gray (figure)). In iOS 8, it worked properly.

A subclass of UIPopoverBackgroundView should be the last option, because I just want to change its color, nothing more.

Any ideas?

let vc = segue.destinationViewController as! StatisticSettings_TVC vc.preferredContentSize = CGSizeMake(300.0, 400.0) vc.view.backgroundColor = app.COLOR_STAT_LEGEND_BACKGROUND if let ppc = vc.popoverPresentationController { ppc.delegate = self ppc.backgroundColor = app.COLOR_STAT_LEGEND_BACKGROUND } 

Popover Error

+5
source share

Source: https://habr.com/ru/post/1233544/


All Articles