D. Murphy D. Murphy - 1 year ago 153
Swift Question

Detect Gesture on Xcode 8.0 Swift 3.0

What is an easy way to detect a swipe gesture in Xcode 8.0 Swift 3.0. I want to implement this into a segue that goes off the screen when a user swipes.


Answer Source

The best way of doing this is to drag a swipe gesture recognizer into the VC. Then at the top of the VC, you can drag the icon of the swipe gesture recognizer to the VC you want to segue to. In your case, you would want to use a custom segue so that you can create a segue to suit your needs. If you want to you can change the direction of the swipe in the right sidebar when you select the gesture.

enter image description here

Hope this helps :-)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download