Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Popover arrow not the same color as the viewcontroller background

The title says it all really. I have a view controller connected to a button as a popover. The view controller's background color is grey, but the color of the arrow pointing to the button is white. Any help would be much appreciated.

like image 886
user2816600 Avatar asked Sep 11 '25 10:09

user2816600


2 Answers

Here's how I get around it:

popover = [[UIPopoverController alloc] initWithContentViewController:contentViewController];
popover.backgroundColor = contentViewController.view.backgroundColor;

This matches the popover to the color of the content's background.

like image 103
mahboudz Avatar answered Sep 13 '25 00:09

mahboudz


for ios 9.0 + (cpvc is your ViewController)

cpvc.popoverPresentationController.backgroundColor = cpvc.view.backgroundColor;
like image 28
NSGodMode Avatar answered Sep 13 '25 00:09

NSGodMode