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

Proposal: Add cancelation token #35

Open
vkondrashkov opened this issue Oct 23, 2019 · 0 comments
Open

Proposal: Add cancelation token #35

vkondrashkov opened this issue Oct 23, 2019 · 0 comments
Labels
enhancement New feature or request
Projects
Milestone

Comments

@vkondrashkov
Copy link
Member

At this moment when animation starts we can't control it in any way. For some reason animation should be canceled and new one should start, but if do it without canceling previous one there would be animation collision.

It would be nice to access cancelation token, for example:

let currentAnimationToken = layer.lotus.runAnimation { make in
    make.scaling.to(2.0).during(1.0)
}.then { make in
    make.rotation.to(6.0 * .pi).during(2.0).delay(0.5)
}

// ...
currentAnimationToken.stopAnimation() // terminate or cancel
@vkondrashkov vkondrashkov added the enhancement New feature or request label Oct 23, 2019
@vkondrashkov vkondrashkov added this to To do in lotus Oct 23, 2019
@vkondrashkov vkondrashkov added this to the 0.3.0 milestone Feb 13, 2020
@vkondrashkov vkondrashkov changed the title Add cancelation token Proposal: Add cancelation token Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
lotus
  
To do
Development

No branches or pull requests

1 participant