How can I show ViewController in UITabBarController?
I have a UITabBarController and all my other view controllers are connected to it. Now I want to show one my controller as: let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc: ViewController = storyboard.instantiateViewControllerWithIdentifier("ViewController") as! ViewController but when I tried to: let rootViewController = self.window?.rootViewController as! UINavigationController rootViewController.pushViewController(vc, animated: true) it gave me the next error: Could not cast value of type 'UITabBarController' (0x1a899b818) to 'UINavigationController' Later I've tried to do: