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

Reset Animation #47

Closed
nlogioco opened this issue Feb 7, 2017 · 7 comments
Closed

Reset Animation #47

nlogioco opened this issue Feb 7, 2017 · 7 comments

Comments

@nlogioco
Copy link

nlogioco commented Feb 7, 2017

I'm speaking in particular to iOS. Is there currently a way for an animation to be reset before it completes?

@nlogioco
Copy link
Author

nlogioco commented Feb 7, 2017

Can you reset an animation by using 'animationProgress = 0.0'?

@buba447
Copy link
Collaborator

buba447 commented Feb 7, 2017

@nlogioco Yeah that should work! is it not working?

@nlogioco
Copy link
Author

nlogioco commented Feb 7, 2017

@buba447
It is. I realized if 'animationProgress' is set before 'play' it'll go to that progress spot via animation. If 'animationProgress' is set after play, it'll cancel the animation and go back to beginning and not play.

I have noticed something weird (not sure if it is by design):

animation.animationProgress = 0.9
animation.play()

Expected results v1:
Start the animation at 0% completed
End the animation at 90% completed

Expected results v1:
Start the animation at 90% completed
End the animation at 100% completed

Actual results:
Start the animation at 0% completed
End the animation at 10% completed

@buba447
Copy link
Collaborator

buba447 commented Feb 8, 2017

Hmm thats very strange @nlogioco
Is the animation.animationProgress = 0.9 animation.play() happening before or after you've added it to a superview? Can I get more context?

@nlogioco
Copy link
Author

nlogioco commented Feb 8, 2017

@buba447

I add it to the superview before setting the properties.

What would you recommend?

@buba447
Copy link
Collaborator

buba447 commented Feb 13, 2017

@nlogioco I think i found a fix. I push pushed it to master.

@buba447
Copy link
Collaborator

buba447 commented Feb 13, 2017

@nlogioco Please check it out and let me know if it didn't work!

#91

@buba447 buba447 closed this as completed Feb 13, 2017
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