As we know, if we want to navigate from one view controller to another between different Storyboards, it requires to code programmatically.
In this blog, I am discussing how we can create segues between multiple storyboards in the same Xcode project using storyboard references.
The drawback of using Single Storyboards is that it becomes complex to manage large projects.
Storyboard References are very helpful when you decide you decide to divide your views between storyboards.
Step 1: Create a new Single View Application project.
Step 2: There will be main.storyboard present by default. Now, create a new storyboard file.
Step 3: Now, create a new view controller inside the new storyboard.
Step 4: On main.storyboard click on (+) Library and search for Storyboard Reference.
Step 5: Drag and Drop the
Storyboard Reference into the
Main.StoryBoard . Now, in the attributes inspector, select the new.Storyboard from Storyboard dropdown and set the
Reference ID as the
Storyboard ID of the
Now, we can create a segue from
FirstViewController to this Storyboard reference for
new.Storyboard and this will work as a normal segue.
Please follow the above step and and if you have any issue or suggestion you can leave your query/suggestion in the comment section I will try to solve that.
Be the first to comment.