I am trying to use a nested function in xcode. What am I doing wrong?
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
performSegue(withIdentifier: "segue", sender: self)
func prepare(for segue: UIStoryboardSegue, sender: Any?){
print("Worked")
}
}
I am expecting my code to print "Worked" when the segue happens. It is not printing.