Answer the question
In order to leave comments, you need to log in
What does indexPathForSelectedRow look like in swift 3?
Hello! How to change indexPathForSelectedRow in swift 3 so that it doesn't throw an error. As I understand this function was removed or renamed, tell me how to fix it.
Answer the question
In order to leave comments, you need to log in
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "showDetails" {
if let destination = segue.destination as? TheChoiseOfShipTableViewController,
let cell = sender as? UITableViewCell,
let indexPath = tableView.indexPath(for: cell) {
destination.ships = self.ships[indexPath.row]
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question