Remove the inner shadow that UIPopoverController creates

Sorig picture Sorig · Jan 5, 2012 · Viewed 7.8k times · Source

I am creating a custom layout of the popover that iOS provides. I have subclassed the UIPopoverBackgroundView and got it to draw the background for my popover correctly. My problem is now that UIPopoverController creates an inner shadow on the popover affecting the contentViewController of the popover. I want to remove this inner shadow, so only the content of my contentViewController is displayed.

This is how the popover currently looks, with a UILabel to demonstrate the effect on the contentViewController.

popover

Is there any way to remove this inner shadow?

Answer

kajham picture kajham · Oct 2, 2012

Support for this was added in ios6.0 with the following call:

+ (BOOL)wantsDefaultContentAppearance

Link to documentation: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPopoverBackgroundView_class/Reference/Reference.html