Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow Not Working (Partial Solution Provided) #67

Open
kreeble opened this issue Nov 2, 2016 · 0 comments
Open

Shadow Not Working (Partial Solution Provided) #67

kreeble opened this issue Nov 2, 2016 · 0 comments

Comments

@kreeble
Copy link

kreeble commented Nov 2, 2016

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);
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant