【发布时间】:2015-05-08 06:19:38
【问题描述】:
我已经广泛搜索了这个问题,但没有任何建议对我有用。我对此也很陌生,所以问题可能是非常基本的。我正在尝试创建从表视图控制器到具有表视图的视图控制器的 segue。当我在模拟器中运行它时,当我单击一个单元格时它会崩溃并给我这个错误:由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'Receiver () has no segue with identifier。
这是我的代码:
var conditions = [Condition]()
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
for Location in locations {
for Condition in Location.conditions {
conditions.append(Condition)
}
}
let selectedCondition = conditions[indexPath.row]
let destinationVC = TestTableViewController()
destinationVC.condition = selectedCondition
destinationVC.performSegueWithIdentifier("FirstSegue", sender: self)
}
我尝试在模拟器上删除应用程序,执行 Product -> clean,重命名情节提要,并且我确定 segue 的命名正确。
谢谢!
【问题讨论】:
标签: xcode