Shaheer Palollathil
Shaheer Palollathil

Reputation: 313

How to set clearColor for UIPopover View?

I need to set UIPopover background color to clearColor. But rest of all colors are working fine with below code:

myPopover.backgroundColor = [UIColor greenColor];

but when I set clearColor, there is a white background instead of transparent. Can any one help me. Thanks in Advance!

Upvotes: 2

Views: 1221

Answers (1)

Dominik Hadl
Dominik Hadl

Reputation: 3619

If what you're talking about is a UIPopoverController, then try setting the background color to its content view controller's view.

myPopover.contentViewController.view.backgroundColor = [UIColor clearColor];

Also, check this SO post about custom popover backgrounds.

Upvotes: 1

Related Questions