Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 接收方没有标识符为的segue,尽管segue实际上已声明_Ios_Swift_Xcode_Uistoryboardsegue - Fatal编程技术网

Ios 接收方没有标识符为的segue,尽管segue实际上已声明

Ios 接收方没有标识符为的segue,尽管segue实际上已声明,ios,swift,xcode,uistoryboardsegue,Ios,Swift,Xcode,Uistoryboardsegue,我正在一个新的Swift项目中工作,我正在尝试一项简单的任务,即每当按下按钮时执行一个segue。但是,每当我尝试触发segue时,就会弹出以下错误: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<Ma2Mi.LandingViewController: 0x7f99c65122b0>) has no segue with identifier '

我正在一个新的Swift项目中工作,我正在尝试一项简单的任务,即每当按下按钮时执行一个
segue
。但是,每当我尝试触发segue时,就会弹出以下错误:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<Ma2Mi.LandingViewController: 0x7f99c65122b0>) has no segue with identifier 'showLogin''
这么简单的任务怎么可能失败呢?也许是一只虫子,或者是我忽略了什么


谢谢。

您是否在触发segue的ViewController上使用了所需的
init()
功能?我也有同样的问题,直到我将其删除。

LandingViewController的实例是如何创建的?@Paulw11它都是故事板
LandingViewController
是否是此情节提要的根viewController
UINavigationController
可能是从UI元素而不是情节提要中的视图控制器实例中拖动了ctrl键?@AndréSlotta我已经尝试重新建立连接了\可能是序列名称中的空白?如果没有,这没有任何意义。:)
loginButton.addAction {
    self.performSegue(withIdentifier: "showLogin", sender: nil)
}