Skip to content

Shadow Not Working (Partial Solution Provided) #67

@kreeble

Description

@kreeble

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);
....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions