My objective is to create a tabbed application, then the view for each of the tabs are constructed in separate storyboards.
My mainstoryboard is a tab view.
Then I create a secondary storyboard (storyboard#2) with 2 View Controllers. The first view controller (also ticked as initial) have a button, and segue (modal) to 2nd view.
I managed to load the view by subclassing and overriding loadView from storyboard#2.
Here's the simulator output.
When click on the "click me" button, I get a EXC_BAD_ACCESS
. The segue does not work, seems like the second storyboard is not being loaded completely.
Has anyone tried to do this before and get it working? There's a youtube video from SkillMaster.net but he does not demonstrate if a segue is working under the secondary storyboard. the video is here: http://youtu.be/D4_twoYvB4M
Thanks for any input and help!
Screenshots:
Apple introduced them in iOS 9 and macOS 10.11. They do exactly what I needed. They allow you to break a storyboard up into multiple, smaller storyboards. A storyboard reference ties multiple storyboards together, creating one, large, composite storyboard.
On the main storyboard, drag and drop a Storyboard Reference from the object library into the storyboard, then Ctrl + click a button on the main controller -> drag it to the Storyboard Reference -> Select Show. Now we just created a segue between two storyboards.
The answer is YES! Here we will be discussing a simple way to use SwiftUI into our existing project, which already consists of a storyboard. Let's dive in then!
These are the best articles I've seen on multiple storyboards.
Not only does this guy tell you how to create a new storyboard in code, he
Note that this last point is important because the key downside of multiple storyboards is that you can't usually link them with segues, but robs library allows that with a bit of fudging
Also see the discussed here
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