UIViewPropertyAnimator does not apply additive animation sometimes.

Updated
Dec 25, 2021 9:36 AM
Created
Dec 25, 2021 9:33 AM
Tags
SwiftUIKit.frameworkiOSCoreAnimation
Attributes

looks like, using velocity parameter in Spring animation removes current animation. try to set .zero velocity in the animations.

let animator = UIViewPropertyAnimator(
  duration: 0.6,
  timingParameters: UISpringTimingParameters(
    dampingRatio: 1,
    initialVelocity: .zero
  )
)