I have a Split Controller with cells in the master view controller. When I click on a specific cell, I want the detail view controller to switch to a specific view controller that I have on my storyboard.
I tried connecting the two view controllers (master to new view controller), gave the new controller a storyboard ID "NewDetailSegue" and tried this code:
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if (indexPath.row == 0) {
self.performSegueWithIdentifier("NewDetailSegue", sender: self)
}
but it does not work at all and crashes. How do I have the detail view controller segue to a new view controller?
Here is the error:
2015-04-10 22:06:44.180 velcro[3616:174510] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<velcro.MainReportController: 0x7feeb95881b0>) has no segue with identifier 'NewDetailSegue'