navigationController is nil in swift
<p>I have two storyboard (Main and SB2)</p>

<p>I have one view controller in storyboard in Main and one in SB2
I perform </p>

<pre><code>let SB2 = UIStoryboard(name: "SB2", bundle:nil)
let vc : UIViewController = self.SB2.instantiateViewControllerWithIdentifier("VC2")
self.showViewController(vc, sender: self)
</code></pre>

<p>After the second viewcontroller loads and this command is run, it prints nil:</p>

<pre><code>print(self.navigationController) // prints nil
</code></pre>

<p>In SB2 (second storyboard) I clicked on the viewcontroller (VC2) and then clicked on Editor > Embed In > Navigation Controller. This placed a navigation controller with the storyboard and the root view controller is VC2. I triple checked this. The first sign of it being connected was the gray navigation bar on top. The second being that there is segue connecting the navigation controller to VC2 and the last place I could have checked is in the navigation controller utilities. </p>

<p>I am thinking that maybe I shouldn't transition from VC1 to VC2 directly but rather VC1 to NavigationController however I don't know how to do this or if its even possible.</p>

<p>I don't know when sb2 prints nil when in face a navigation controller is connected to it. Any help is appreciated.</p>