I would like to load a secondary storyboard Test.storyboard
(next to Main.storyboard
) in my app like so:
let storyboard = UIStoryboard(name: "Test.storyboard", bundle: nil)
Test.storyboard
resides inside a group Test
, it is marked for localization as Base (hence its Location Relative to Group is reported as Base.lproj/Test.storyboard
) and it also marked for target membership in my app target. When I run the app on the simulator, I can confirm that a file Base.lproj/Test.storyboardc
exists inside the app's main bundle.
Yet the above code produces this error:
Could not find a storyboard named 'Test.storyboard' in bundle ...
What is the right way to successfully package and load a secondary storyboard like mine?