title: Passing Values to UIViewController in new Storyboard - Swift
body: <p>I am trying to pass values to a new view controller - located within a new storyboard file. However when I do so, the result I get from the NewViewController is always nil.</p>
  
  <p>Below is how I show the view controller within the new storyboard:</p>
  
  <pre><code>// Show create account page with custom transition
  var storyboard : UIStoryboard = UIStoryboard(name: StoryboardName, bundle: nil)
  var vc : UIViewController = storyboard.instantiateViewControllerWithIdentifier(NewViewController) as UIViewController
  </code></pre>
  
  <p>I try to send the information here:</p>
  
  <pre><code>// Pass the delegate to the first view controller
  let newViewController:NewViewController = NewViewController()
  newViewController.createAccountDelegate = self
  newViewController.teststring = "hello"
  </code></pre>
  
  <p>And then present the view controller.</p>
  
  <pre><code>vc.transitioningDelegate = self
  vc.modalTransitionStyle = UIModalTransitionStyle.CoverVertical
  self.presentViewController(vc, animated: true, completion: nil)
  </code></pre>
  
  <p>Here is my NewViewController, where I try to receive the values. However end up still being nil.</p>
  
  <pre><code>import UIKit
  
  class NewViewController: UIViewController {
      var createAccountDelegate:AccountCreationDelegate!
      var teststring:NSString!
  
      override func viewDidLoad() {
          super.viewDidLoad()
      }
  </code></pre>
  
  <p>Am I sending the values incorrectly?</p>