Open m1ga opened 5 hours ago
@m1ga can you assign this to me
Awesome! Check the code in https://github.com/tidev/titanium-sdk/pull/13743 on Android to see what it does (press animate
and in the middle of the animation press cancel
to make it stop at that point).
I have searched and made sure there are no existing issues for the issue I am filing
Description
On Android I've added https://github.com/tidev/titanium-sdk/pull/13743 to run
view.stopAnimation();
in order to stop an animation (check the ticket for example code). It would be great to have that on iOS too.I've found https://developer.apple.com/library/archive/qa/qa1673/_index.html and added this to TiUIView:
which works fine and will stop the animation at the point it currently is. But I wasn't able to start a new animation from the start again. Not a resume but just the normal
view.animate()
to start the animation from the start again (that's how Android works).Any idea how to reset it? I've tried to set the speed back to 1 and the time to 0, also tried
[self.layer removeAllAnimations];
but it didn't reset it.Solution
Add a way to stop/pause the animation and when you call
view.animate()
again it should start again.Alternatives
No response
Platforms
iOS