didSelectRowAt
函数中,代码是这样的:MenuViewController.swift:
switch indexPath.row {
case 0:
performSegue(withIdentifier: "MySegue", sender: self)
case 1:
performSegue(withIdentifier: "OtherSegue", sender: self)
defualt:
break
}
已设置从 MenuViewController 到另一个 destinationViewController 的segue,其标识符也设置为“ MySegue ”。< / p>
重要: destinationViweController 是 TabBarViewController 。
问题:当tableView中的第一行点击,项目崩溃且错误为:
Could not perform segue with identifier 'MySegue'. A segue must either have a performHandler or it must override -perform.