title: How to pass data to another controller on dismiss ViewController?
body: <p>I want to pass my data from one <code>ViewController</code> to another VC on VC dismiss. Is it possible?</p>
  
  <p>I've tried the next method and no success:</p>
  
  <p>On button click:</p>
  
  <pre><code>self.dismiss(animated: true) { 
          let storyboard = UIStoryboard(name: "Main", bundle: nil)
          let controller = storyboard.instantiateViewController(withIdentifier: "EditViewController") as! EditViewController
          controller.segueArray = [values]
      }
  </code></pre>
  
  <p>when <code>EditViewController</code> appears again, my <code>segueArray</code> is <code>nil</code> there.</p>
  
  <p>How can I pass my data from <code>my ViewController</code> to the <code>EditViewController</code> on dismiss?</p>