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
You need to investigate the interactivePopGestureRecognizer property of your UINavigationController.
UINavigationController
Here is a similar question with example code to hook this up.
UINavigationController interactivePopGestureRecognizer working abnormal in iOS7