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

Is it possible to make the animation names enums instead of strings? #306

Open
JavaChiu opened this issue May 27, 2018 · 3 comments
Open

Comments

@JavaChiu
Copy link

As title, when I was playing with the animation, I often have to be very careful about what I typed or else the animation might fail. Is it possible to change it to enums? It will be sweeter to have some auto-completion too.

@imagemason
Copy link

There are enums inside the Spring class that I am using

Spring.AnimationPreset and Spring.AnimationCurve

@JavaChiu
Copy link
Author

But the first level is still using string, for example,
layer.animation = "squeezeDown"

@imagemason
Copy link

Not sure I'm following sorry. Here's what I mean:

layer.animation = Spring.AnimationPreset.FadeInDown.rawValue

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

2 participants