title: Not able to pass data between view controllers
body: <p>I am trying to pass the String <code>sendname</code> in <code>ViewController</code> to the String variable <code>finalName</code> in another view controller, <code>DatabaseTableViewController</code>. Here is my code in <code>ViewController</code>:</p>
  
  <pre><code>                    self.sendname = self.name.text!
                      let vc = DatabaseTableViewController()
                      print("sending: \(self.sendname)")
                      vc.finalName = self.sendname
                      self.navigationController?.pushViewController(vc, animated: true)
                      let next = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "DatabaseTableViewController") as! DatabaseTableViewController
                      self.present(next, animated: true, completion: nil)
  </code></pre>
  
  <p>and my variable in <code>viewDidLoad</code> in <code>DatabaseTableViewController</code>:</p>
  
  <pre><code>class DatabaseTableViewController: UIViewController {
  
      var finalName: String? = nil
  </code></pre>
  
  <p>My code correctly prints <code>sending: Satya</code>, but when I print the value of <code>finalName</code> in <code>DatabaseTableViewController</code>, it still gives me <code>nil</code>. What should I do?</p>
  
  <p>Thanks, Satya</p>