Search code examples
iosxcodeviewcontrolleruistoryboardsegue

Cannot connect two Viewcontrollers together


I'm trying to connect two View Controllers in my storyboard with segues. Usually I just had to control drag and then connect them and select the segue I wanted. However now I just control drag, then the blue line appears however when I drop it nothing happens. No pop up, no connection. What happened?


Solution

  • Should all work the same. Be sure to drag from your view controller to the the view you'll transition to. Give the segue an identifier string and then you can transition with performSegueWithIdentifier.

    self.performSegueWithIdentifier("segueIdentifier", sender:self)
    

    Creating a segue

    Naming segue