我正在尝试以编程方式在LiveController.swift
中进行搜索。相关的代码位在LiveController.swift
self.performSegue(withIdentifier:"openWelcomePage" ,sender:self)
引发错误:
2020-04-16 20:51:44.614413-0400 alpha[53206:2805423] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<alpha.LiveController: 0x101c248c0>) has no segue with identifier 'openWelcomePage''
这表示未命名segue。但是它有:
请注意,突出显示的NavigationController
是源,它嵌入了Live
,它附加在LiveController.swift
上。搜索的目标是带有Log in
和Sign up
的页面。
[将按钮放入LiveController
并将按钮从按钮拖动到Welcome
视图并命名为buttonSegue
时的注意:
self.performSegue(withIdentifier:"buttonSegue" ,sender:self)
按预期方式模态显示页面。
这可能是几件事,所以请尝试以下修复:
Attribute Inspector
中,删除openWelcomePage
并留空。希望这些建议中的任何一个都有帮助。