UIPopoverPresentationController dimming background darker
Since the user is asking for an Obj C solution - use in the VC that's being displayed in the popover
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.popoverPresentationController.containerView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
}
Swift 4
I just came upon the same problem and found a solution similar to jimmyjudas.
In the viewController displayed as a popover:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.presentingViewController?.view.alpha = 0.3
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.presentingViewController?.view.alpha = 1
}
Easiest method is to simply call self.view.alpha = 0.2
before presenting the popover and setting it back to 1.0 when the popover is dismissed.