I am passing data from a table view controller to a detail view. I tried using indexPath.row directly in my prepareForSegue method, however it displays
indexPath.row
prepareForSegue
Swift 3 update:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { let selectedIndex = tableView.indexPath(for: sender as! UITableViewCell)! // Do your actual preparing here... }