title: How to transfer data from one ViewController to another through closure
body: <p>I have 2 viewController. I make the transition from one viewController to another, then perform actions, and when I return, I have to pass data to the first viewController, but a prerequisite is to do this through the closure</p>
  
  <p>for example
  code in ViewController 2</p>
  
  <pre><code> var string: ((String) -&gt; Void)?
  @IBAction func action(_ sender: Any) {
      strii?("Lol")
      dismiss(animated: true)
  }
  </code></pre>