WEPopover icon indicating copy to clipboard operation
WEPopover copied to clipboard

Shadow Not Working (Partial Solution Provided)

Open kreeble opened this issue 8 years ago • 0 comments

If you set WEPopoverContainerViewProperties.shadowColor to a solid color, it doesn't work as expected. This is because the -shadowView is empty and thus won't cast any shadow.

The solution is to manually provide a shadow path. You will have to adjust the path or the WEPopoverContainerViewProperties's background image or margins.

You can put this line inside [WEPopoverContainerView -initFrame] after the -shadowView frame is set:

....
_bgView.frame = _bgRect;		// PROVIDED FOR CONTEXT
_shadowView.frame = _bgRect;	// PROVIDED FOR CONTEXT

// set shadow path here when shadowView.frame is set.
// we need it since the shadowView is empty and won't cast any shadow.
_shadowView.layer.shadowPath = CGPathCreateWithRect(_shadowView.bounds, NULL);
....

kreeble avatar Nov 02 '16 03:11 kreeble