macgeezer macgeezer - 1 year ago 107
iOS Question

How do I add a segue to an UIGestureRecognizer

I am building an app for the first time using Storyboards. I have a scene which I would like to have open another scene when there is a long tap on a particular button. I am able to add the

with no problem, but I can't figure out how to have that gesture be the segue to the other scene. Doesn't seem to matter what I Ctrl-Drag, nothing works.

Am I missing something obvious?


Answer Source

You can control-drag from your first controller's window to your second controller to create the segue, and then you can call performSegueWithIdentifier in your GestureRecognizer method.

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