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

Using GradientView programatically #1

Closed
manuelCarlos opened this issue Oct 14, 2020 · 2 comments
Closed

Using GradientView programatically #1

manuelCarlos opened this issue Oct 14, 2020 · 2 comments

Comments

@manuelCarlos
Copy link

Hi. This is great work!
Question:
I'm probably missing something obvious but, I'm trying to use your implementation (programatically) to add a smooth transparency gradient and I can't make it work - the gradient alpha doesn't change between a .clear and solid color, but it works fine on the storyboard of the example app.
Any idea how I can fix this?
Many thanks in advance!

@manuelCarlos
Copy link
Author

manuelCarlos commented Oct 14, 2020

I updated your swift2 implementation for Swift 5. I'll be happy to submit a PR if that helps 👍🏻

@manuelCarlos
Copy link
Author

Ah got it 🎉
The GradientView backgroundColor property needs to be set to .clear

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