facebookarchive / pop

An extensible iOS and OS X animation library, useful for physics-based interactions.
Other
19.66k stars 2.88k forks source link

currentTime of POPCustomAnimation #319

Closed LiuliuAnimaux closed 8 years ago

LiuliuAnimaux commented 8 years ago

I wonder what does currentTime of POPCustomAnimation really means.

It seams that this property marks the time interval since a static time, like 2016-4-13 or some other constant date. And this is really useless.

And what I really care is the time interval since the animation begins. You can simply fix this problem by add another property.

nlutsenko commented 8 years ago

elapsedTime according to the documentation is the time since last callback, so this works as intended. Usually for the same animation it's going to be the same, that's why you probably see the same constant al the time. For you use case - I would recommend using animation.currenTime - animation.beginTime which will give you the time interval since the start of the animation.

Let me know if it works for you and feel free to reopen this issue if the problem remains unsolved.