title: How to access segue in 'didSelectRowAtIndexPath'?
body: <p>I know how to pass data using segues from <strong>prepareForSegue</strong> function, but the thing i have a TableViewCell from which there are two possible segues to two different ViewControllers (let's just say A, B as of now).</p>
  <p>It was suggested <a href="https://stackoverflow.com/questions/8837944/ios-storyboard-multiple-segues-from-a-tablecell">here</a> that it is best to connect the segues to View controller rather than the tableCell itself, which infact worked perfectly. But i want to pass information to the second View controller when the cell is clicked, So how to access <strong>segue</strong> that i connected to the Source ViewController.</p>
  <pre><code>override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if segue.identifier == &quot;showQuestionnaire&quot;{
      if let indexPath = self.tableView.indexPathForSelectedRow() {
        let controller = (segue.destinationViewController as! UINavigationController).topViewController as! QuestionnaireController
        let patientQuestionnaire = patientQuestionnaires[indexPath.row] as! PatientQuestionnaire
        controller.selectedQuestionnaire = patientQuestionnaire
        self.performSegueWithIdentifier(&quot;showQuestionnaire&quot;, sender: self)
      }
    }
  }
  </code></pre>
  <p>Again: This question is not regarding passing information through <strong>prepareForSegue</strong></p>