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

Drop shadow issue #98

Open
ahmetcanakgl opened this issue Oct 15, 2019 · 0 comments
Open

Drop shadow issue #98

ahmetcanakgl opened this issue Oct 15, 2019 · 0 comments

Comments

@ahmetcanakgl
Copy link

I ve tried to give bottom drop shadow to headerView but none of them worked, is there anything should I know ? I ve tried these code blocks:

headerView.layer.shadowOpacity = 1
headerView.layer.shadowOffset = CGSize(width: 0, height: 1)
headerView.layer.shadowRadius = 1

let layer : CAGradientLayer
layer.colors = [fromColor.cgColor, toColor.cgColor]
layer.shadowRadius = 1
layer.startPoint = CGPoint(x: 0.5, y: 1.0)
layer.endPoint = CGPoint(x: 0.5, y: 0.0)
layer.frame = CGRect(x: 0.0, y: headerView.frame.height - shadowRadius, width: headerView.frame.width, height: shadowRadius)
headerView.layer.addSublayer(layer)
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