title: Passing Data in Swift
body: <p>I have been looking for an answer for this, but have only found answers for segues. </p>
  
  <p>I have <code>viewController1</code> with a button that segues to <code>viewController2</code>. There is no code for this, I set it up through Interface builder. On <code>viewController2</code> I have a button that dismisses itself with</p>
  
  <pre><code> self.dismissViewControllerAnimated(true, completion, nil)
  </code></pre>
  
  <p>I want to pass a string from <code>viewController2</code> back to <code>viewController1</code> when the view is dismissed. How do I go about doing this? Also, I am using swift.</p>
  
  <p>Thanks in advance!</p>