Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Segue to another storyboard via interface builder

How do you create a segue between a view controller in one storyboard and a view controller in another storyboard?

like image 516
razor118 Avatar asked Oct 14 '15 12:10

razor118


1 Answers

Earlier it was not possible without code, but since Xcode 7, Apple has given us a powerful tool - Storyboard References.

What you need to do is to drag and drop this element to your initiating storyboard:

storyboard reference

In its options you select the proper storyboard and optionally (default it uses initial view controller) set its id.

storyboard reference options

Now you can define segue to this view controller as normal.

Please note that only normal segues work with iOS8. Relationship ones (like root, embed etc.) work only in iOS9.

like image 75
Szymon Kuczur Avatar answered Oct 16 '22 23:10

Szymon Kuczur