I had the following custom transition using UIView.animateWithDuration(...usingSpringWithDamping:...) which worked fine.
UIView.animateWithDuration(self.transitionDuration(transitionContext), delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 1.0, options: nil, animations: {() in
But then I had to expand my custom transition using UIViewControllerInteractiveTransitioning to have an interactive transition where the user can view the modal view again.
Therefore, I need keyframes for the animation so that UIPercentDrivenInteractiveTransition works correctly.
So I changed the animation function to use UIView.animateWithKeyframes...
UIView.animateKeyframesWithDuration(self.transitionDuration(transitionContext), delay: 0.0, options: UIViewKeyframeAnimationOptions.CalculationModeCubic, animations: {() in
My problem now: I lost the spring animation.
I checked several links, one of the most promising was:
... but with the .addKeyframes... method .addKeyframes... I cannot specify the required termination block.
Any suggestions?: -/
Chris source share