Custom animation when dismissing view controller with swipe gesture

Viewed 153

I am using the Hero library for a custom transition animation when pushing a view controller onto the navigation stack. This works very well, however, the dismissal of the view controller only animates if I'm using the back button, not if I'm using the swipe gesture, which defaults to the built-in iOS animation. How can I enable Hero for the swipe gesture dismissal too?

1 Answers

You can enable Hero for the swipe back gesture on iOS by setting the following parameter on both Hero widgets :

transitionOnUserGestures: true
Related