title: how to call existing navigationcontroller in Swift
body: <p>I have 3 items in my storyboard. 1. viewController (A) connected to 2. Navigation controller and 3. viewController (B) is NOT connected to anything 
  All 3 items have restoration identifiers set in the storyboard.</p>
  
  <p>viewController (B) is the initial view controller.
  I am trying in B to get the navigation controller that A is attached to, but always returns nil: </p>
  
  <pre><code>let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
  let vc = storyBoard.instantiateViewControllerWithIdentifier("viewControllerA") as! ViewControllerA
  print(vc.navigationController?) // always prints nil
  </code></pre>
  
  <p>why!? </p>
  
  <p><strong>UPDATE#1</strong>
  I can't declare a UINavigationController like a view controller. I've tried setting navigationcontroller with the id of 'myNavigationController' as storyboardID: </p>
  
  <p>When storyboard, I get this error </p>
  
  <pre><code>let navigationController = storyBoard.instantiateViewControllerWithIdentifier("myNavigationController") as! UINavigationController
  print(self.navigationController!) // fatal error: unexpectedly found nil while unwrapping an Optional value
  </code></pre>
  
  <p>I've also tried setting the id in restoration identifier, It bombed earlier at the instantiating line</p>
  
  <p>@ColdLogic, see what hits I get when I search the entire project for that identifier:</p>
  
  <p><a href="https://i.stack.imgur.com/KmLra.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KmLra.png" alt="enter image description here"></a></p>