Making an interactive dismissal transition

Implementing an interactive transition requires a bit more work than the non-interactive presentation animation, and the way it works is also somewhat harder to grasp. For the non-interactive transition, transitioningDelegate simply returns an animation controller from animationController(forPresented:presenting:source:).

To implement an interactive dismiss transition, two methods should be implemented. These two methods work together to make the interactive animation happen. The first method is animationController(forDismissed:). This method will return an object that performs and controls the interactive animation, similar to the animation controller you implemented before.

However, to make the ...

Get Mastering iOS 12 Programming - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.