On really fast swipe back gestures, the detail screen can become 'stuck' and lose its navigation controller.
This is bacusestartInteractiveTransition(_:) can get called after the pan gesture recognizer called begin and finish in case of a rapid swipe gesture. In these edge cases, we need to finish (or cancel) the transition immediately.
Also, wantsInteractiveStart must be set to false otherwise UIKit will prevent our finish animation from happening as it will pause any animations by default inside startInteractiveTransition if wantsInteractiveStart is true.
On really fast swipe back gestures, the detail screen can become 'stuck' and lose its navigation controller.
This is bacuse
startInteractiveTransition(_:)
can get called after the pan gesture recognizer calledbegin
andfinish
in case of a rapid swipe gesture. In these edge cases, we need to finish (or cancel) the transition immediately.Also,
wantsInteractiveStart
must be set tofalse
otherwise UIKit will prevent ourfinish
animation from happening as it will pause any animations by default insidestartInteractiveTransition
ifwantsInteractiveStart
is true.