title: Swift Unwind Segue: how to know which row initiated original segue
body: <p>I'm programmatically initiating a segue in a custom table view row action. When that segue unwinds I need to know which row did initiate the segue, but <code>tableView.indexPathForSelectedRow</code> is nil.</p>
  
  <p>Is there some way for me to know the which row did it?</p>
  
  <p>On the TableViewController:</p>
  
  <pre><code>override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -&gt; [UITableViewRowAction]? {
      let edit = UITableViewRowAction(style: .default, title: "Edit") { action, index in
          self.performSegue(withIdentifier: "EditObject", sender: tableView.cellForRow(at: indexPath))
      }
      edit.backgroundColor = UIColor.lightBlue
  }
  
  @IBAction func unwindToObjectList(sender: UIStoryboardSegue) {
      if let sourceViewController = sender.source as? EditObjectTableViewController, let object = sourceViewController.object {
          if let selectedIndexPath = tableView.indexPathForSelectedRow {
              objects[selectedIndexPath.row] = object
              tableView.reloadRows(at: [selectedIndexPath], with: .none)
          } else {
              print("Could not find selected row…") // &lt;- this is printed!
          }
      }
  }
  </code></pre>