I\'m using UIPopoverPresentationController to present popovers in an iOS app. I want to dim the background behind the popover when it comes up. How can I do thi
in swift 3 you can access the overlay:
extension UIPopoverPresentationController {
var dimmingView: UIView? {
return value(forKey: "_dimmingView") as? UIView
}
}
After setting your controller to popover mode
controller.modalPresentationStyle = UIModalPresentationStyle.popover
controller.popoverPresentationController.dimmingView.backgroundColor = UIColor.black.withAlphaComponent(0.4)