How can I show ViewController in UITabBarController?
<p>I have a UITabBarController and all my other view controllers are connected to it. Now I want to show one my controller as:</p>

<pre><code>let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc: ViewController = storyboard.instantiateViewControllerWithIdentifier("ViewController") as! ViewController
</code></pre>

<p>but when I tried to:</p>

<pre><code>let rootViewController = self.window?.rootViewController as! UINavigationController
rootViewController.pushViewController(vc, animated: true)
</code></pre>

<p>it gave me the next error:</p>

<pre><code>Could not cast value of type 'UITabBarController' (0x1a899b818) to 'UINavigationController'
</code></pre>

<p>Later I've tried to do:</p>

<pre><code>let rootViewController = self.window?.rootViewController as! UITabBarController
</code></pre>

<p>but in this case I get</p>

<pre><code>UITabBar has no member pushViewController
</code></pre>

<p>How can I show/push my ViewController so it will appear with UINavigationBar and inside of UITabBar?</p>