D. Murphy D. Murphy - 1 month ago 22
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.

Thanks,

DRM DRM
Answer

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 :-)