title: Why can't set a variable value of a viewController by using another viewController?
body: <p>I know this is Duplicate Question, but i didn't find the solution for my problem. I have two controllers. HomeViewcontroller's variable of "myValue"'s value can't be set by using ViewController class.I don't know the issue here but code is working without error.But when i print "myValue" it shows nil.Destination view controller is not the controller that i want to set variable value. Destination view controller is a tab bar controller, so i want to set the variable value of first tab bar and second tab bar view controllers. This is my code :- </p>
  
  <pre><code>import UIKit
  
    class ViewController: UIViewController { 
  
     override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
  
      if(segue.identifier == "gotoHome") {
          println("1111")
  
          var storyboard = UIStoryboard(name: "Main", bundle: nil)
          var viewController = storyboard.instantiateViewControllerWithIdentifier("HomeViewController") as! HomeViewController
          viewController.myValue = 8888
  
  
           }
  
        }
  
  
    }
  </code></pre>
  
  <p>this is the other view controller</p>
  
  <pre><code>import UIKit
  
   class HomeViewController: UIViewController {
  
     var myValue: Int!
  
      override func viewDidLoad() {
      super.viewDidLoad()
  
      // Do any additional setup after loading the view.
         println(myValue)
  
         }
    }
  </code></pre>