I have tableViewController. I want to click on 1 cell and get print(\"0\") and click on 2 cell and get print(\"1\")
But my code doesn’t wor
It seem that you are trying to mix between Swift 3 and older version. Please change it to:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
In Swift 3 the signature of the method in an UITableViewController is
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)