Dragging onto the exit of the viewcontroller not working Dragging onto the exit of the viewcontroller not working xcode xcode

Dragging onto the exit of the viewcontroller not working


To set up an unwind segue, you should

  1. Set up your two scenes with the standard modal or push segue between them:

    enter image description here

  2. Define the custom classes for those two scenes to be your respective view controllers.

  3. Implement the action in the .m for view controller A:

    - (IBAction)unwindToA:(UIStoryboardSegue *)segue{    //returning to A}
  4. Then you can create a segue in B by control-dragging (or right-click-dragging) from some control down to the exit outlet in the bar below scene B:

    enter image description here

  5. And if everything above is configured correctly, you will now see your unwind segue listed in a popover:

    enter image description here


To make Exit outlet active, add this code to viewController. Now you should be able to ctrl-drag to exit outlet.It is actually quite odd, that there should be empty method to make it work.

swift@IBAction func unwindSegue(unwindSegue:UIStoryboardSegue) objC- (IBAction)unwindSegue:(UIStoryboardSegue *)sender;


I also had a problem with this even though everything was set up correctly. Eventually I tried closing the project and reopening it and that did the trick. Must have been some bug in Xcode.

This doesn't seem to have been the cause of your problem but I thought I'd add the answer in case someone else has the same problem.