Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the "fuzzy" drop shadow in the UIPopoverController

I don't want the drop shadow when the UIPopoverController's view appears. Is there a way to remove this drop shadow look?

like image 949
Arcadian Avatar asked Mar 08 '11 16:03

Arcadian


1 Answers

Not straight forward, but since iOS 5, you can make your own custom popover background using UIPopoverBackgroundView.

See the answer for this question: Using UIPopoverBackgroundView class. It's pointing to a good tuto.

Then, in the initWithFrame of your UIPopoverBackgroundView implementation, you can use a clearColor for the drop shadow. Using offset and radius did not work for me.

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {

        self.layer.shadowColor = [[UIColor clearColor] CGColor];
    }
    return self;
}
like image 121
niko34 Avatar answered Dec 30 '22 09:12

niko34