I am using an UITableViewController for it and I override the following method and try to enable different segues when the user select different row.
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { print("You selected row #\(indexPath.row)!") switch indexPath.row { case 3: performSegue(withIdentifier: "segue3", sender: self) case 8: performSegue(withIdentifier: "segue8", sender: self) default: break } } But actually, this method never get called, and the print out never show up when I select a row.
I did enable single selection, enable user interaction and set the delegate and datasource to the controller itself (That's automatically set when using UITableViewController, right?)
I am using static cells and default UITableViewCell. The view controller is UITableViewController.
Update:
I try to replace:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: IndexPath) With:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) And this doesn't work also.


UITableViewController, you need to override the default implementation, which means you need the keywordoverridefor the method. Your Update is not clear enough whether you putoverrideor not.