I have 2 storyboard - mainStoryBoard1
and mainStoryBoard2
.
I need to perform a segue from ViewController of mainStoryBoard1
to ViewController of mainStoryBoard2.
Anyone has idea how to do this?
Storyboard references allow you to break a storyboard up into multiple, smaller storyboards. A storyboard reference ties multiple storyboards together, creating one, large, composite storyboard. Looking back, it is crazy that storyboard references made their way into the SDK years after the introduction of storyboards.
A storyboard is meant to explain a story, not a saga. An app's storyboard can be easily divided into multiple storyboards, with each one representing an individual story.
Interface Builder in Xcode 7 has "Storyboard Reference" object in the "Object library":
Just drag that onto your storyboard. You can then select that storyboard reference and specify the storyboard to which it refers in the attributes inspector:
Then you can now add segue to this reference and you'll segue from the scene in one storyboard to a scene in another storyboard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With