-
Notifications
You must be signed in to change notification settings - Fork 206
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
Missing callback when animator finished running. #42
Comments
Thanks for opening @strangeliu. Can you please provide mode information on what you were trying to do, what you expected to happen, and what actually happened? |
In the version v2.2.0, we can run an animation with AnimationRunner and set a callback when it finished running
After upgrade to version 3.0.0, The AnimationRunner is removed, so i use |
Got it – would adding back an optional completion argument be helpful for the methods on public enum CompletionReason {
case finished
case interrupted
}
public func animate(
to finalValue: Value,
duration: Double,
timingFunction: TimingFunction = .swiftOut,
completion: @escaping (CompletionReason) -> Void)
public func simulate<T>(
using function: T,
initialVelocity: T.Value,
completion: @escaping (CompletionReason) -> Void = { _ in }) where Value == T.Value, T : SimulationFunction
public func simulate<T>(
using function: T,
completion: @escaping (CompletionReason) -> Void = { _ in }) where Value == T.Value, T : SimulationFunction |
Most of the previously public API was unused, so v3 moves toward a much simpler model – the advent of types like |
Any update on this? |
use
changedValue == targetValue
is incorrect for some reason.The text was updated successfully, but these errors were encountered: