故事板不包含带有标识符的视图控制器“ sidemenucontroller”
信息:
终止由于未知的例外“ nsinvalidargumentException”,原因是:'故事板(< uistoryboard:0x6000036306c0>)不包含带有标识符的“ homeviewController”''
''
我尝试将side菜单视图添加到MAIRVIEW CONDORLOLLER中这样做。
代码:
guard UIStoryboard(name: "MainViewController", bundle: nil).instantiateViewController(withIdentifier: "SideMenuViewController") is SideMenuViewController else {
fatalError("Unable to Instantiate Quotes View Controller")
}
我设置了所有标识符,它们起作用,但是只有代码的那部分行不通。 我尝试过:清洁建筑文件夹,设置另一个标识符,使用另一个故事板,没有任何帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论