0

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?

seggy
  • 1,176
  • 2
  • 18
  • 38
Drux
  • 11,992
  • 13
  • 66
  • 116

1 Answers1

0

You don't need to load storyboard with .storyboard extension .use like this

   let storyboard = UIStoryboard(name: "Test", bundle: nil)
Sumit Jangra
  • 651
  • 5
  • 16