title: How to pass data from one UIViewController to another one through UITapGestureRecognizer
body: <p>I have a custom a UIView which is in the form of a card. Now I have placed a tap gesture recognizer on it so that when my user clicks on it, it will move to the selected view controller. I have been able to achieve that and it is working well. Now my problem is I want to pass data through this action so that the new view controller can access the data. <code>prepareSegue</code> is not working. Below is my code:</p>
  
  <pre><code>//Function to go to plans view controller
  @objc func goToPlans(_sender: UITapGestureRecognizer) {
      let moveTo = storyboard?.instantiateViewController(withIdentifier: "ChosenOfferViewController")
      present(moveTo!, animated: true, completion: nil)
  }
  
  //Function to add gestures to the card
  func addGesturesToCards() {
      let planRec = UITapGestureRecognizer(target: self, action: #selector(self.goToPlans))
      planCard.addGestureRecognizer(planRec)
  }
  </code></pre>