title: swift access property of previous viewcontroller in navigation stack
body: <p>I am trying to access the previous viewcontroller in a navigation stack.  I want to set a label's text property before I pop back to it.  It crashes after the second line in the function.
  Thanks for any help. </p>
  
  <pre><code>func goBack(){
      let i = (navigationController?.viewControllers.count)! - 1
      let itemViewController = navigationController?.viewControllers[i] as     ItemViewController
      itemViewController.typeValueLbl.text = itemName
      navigationController?.popViewControllerAnimated(true)
  }
  </code></pre>