How can I implement “drag right to dismiss” a View Controller that's in a navigation stack?

后端 未结 6 1852
忘了有多久
忘了有多久 2020-12-07 18:24

By default, if you drag right from the left edge of the screen, it will drag away the ViewController and take it off the stack.

I want to extend this functionality t

6条回答
  •  [愿得一人]
    2020-12-07 18:37

    I think this is easier than the suggested solution and also works for all viewControllers inside that navigation and also for nested scrollviews.

    https://stackoverflow.com/a/58779146/8517882

    Just install the pod and then use EZNavigationController instead of UINavigationController to have this behavior on all view controllers inside that navigation controller.

提交回复
热议问题