How to create a segue between two view controllers in Storyboard?

In order to create segue between two view controllers located in a single storyboard file,

  1. control click the appropriate object from which segue has to originate: button, table/collection view cell/row, gesture recogniser etc…and drag it to the view controller we need to display.

2. After releasing the mouse button, Interface Builder will show a list of segue types for us to choose from.

3. Select the necessary segue type and now we can see a small symbol called segue object connecting our view controllers.

4. Click that icon and select attribute inspector. There provide a unique identifier for our segue.

Now we can use our segue to perform view controller transition.

Leave a Reply

%d bloggers like this: