Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi420 committed Jun 2, 2016
1 parent 44ca5d3 commit ba38504
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ To answer this question:

http://stackoverflow.com/q/35388985/1378447

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

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 to the entire screen. When the user drags right anywhere, I'd like the same to happen.

I know that I can implement a swipe right gesture and simply call self.navigationController?.popViewControllerAnimated(true)

However, there is no "dragging" motion. I want the user to be able to right-drag the view controller as if it's an object, revealing what's underneath. And, if it's dragged past 50%, dismiss it. (Check out instagram to see what I mean.)

0 comments on commit ba38504

Please sign in to comment.