I'm working on my first iOS project without a storyboard, and I'm running into this issue while trying to segue to another View Controller. Would really appreciate help to understand why this issue is occurring. Do I need to define the segue somewhere? Thank you!
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'goToYViewController''
This is what I have:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if (segue.identifier == "goToYViewController") {
if let yInfo = segue.destination as? YViewController {
yInfo.row = "hello"
}
}
}
// in data source
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
self.performSegue(withIdentifier: "goToYViewController", sender: self)
}