title: Passing Data between View Controllers in Swift
body: <p>I am trying to convert an app from Objective-C to Swift but I can't find how to pass data between views using Swift.  My Objective-C code is</p>
  
  <pre><code>UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
  AnsViewController *ansViewController;
  ansViewController = [storyBoard instantiateViewControllerWithIdentifier:@"ansView"];
  ansViewController.num = theNum;
  [self presentViewController:ansViewController animated:YES completion:nil];
  </code></pre>
  
  <p>What that is doing is it basically takes the variable, theNum, and passes it to the variable, num, on a different view controller.  I know this may be an easy question but I am getting pretty confused with Swift so if someone could explain how they changed it to Swift that would be greatly appreciated!</p>
  
  <p>Thanks</p>