0

Message:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x6000036306c0>) doesn't contain a view controller with identifier 'HomeViewController''

I try to add side menu view to my MainViewController and get an error while doing that.

Code:

guard UIStoryboard(name: "MainViewController", bundle: nil).instantiateViewController(withIdentifier: "SideMenuViewController") is SideMenuViewController else {
    fatalError("Unable to Instantiate Quotes View Controller")
}

I set all identifiers and they work, but only that part of code doesn't work. I tried: clean building folder, set another identifier, use another storyboard and nothing helps.

enter image description here

2
  • 3
    Confusing: the error message you quote is complaining about HomeViewController but you're asking about SideMenuViewController (or maybe SideMenuController). Also, is MainViewController really the name of the storyboard? Commented Apr 8, 2022 at 14:28
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Apr 8, 2022 at 17:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.