I'm trying to use a
UIViewPropertyAnimator
to drive a custom navigation controller transition. In my implementation, I set up the animation for the push transition, and then set isReversed = true
on the animator if we actually need a pop transition.This works fine for non-interactive transitions, and it mostly works for an interactive transition, but when I stop the interactive gesture and call
finish()
or cancel()
on the interaction controller, it animates to the .end
or .start
position of the animation respectively, ignoring the isReversed
property.Is there a way to set this up such that when the property animator is reversed it finishes in the reverse direction?
I also have a sample project here that demonstrates the issue: https://github.com/jayrhynas/InteractiveTransitionTest
The relevant code is in DetailTransitionController.swift