I am using Storyboard and want to push a view controller for display in UITabBarController at the click of tab bar item.
For this, I am using an existing ViewController linked to TabBarController created on Storyboard and using below code. However, I get exception, Storyboard doesn't contain a view controller with identifier 'SwitchViewController'
func tabBarController(tabBarController: UITabBarController, shouldSelectViewController viewController: UIViewController) -> Bool {
let switchViewController = self.storyboard?.instantiateViewControllerWithIdentifier("SwitchViewController")
self.presentViewController(switchViewController, animated: true, completion: nil)
return false
}
UPDATE: I added Storyboard ID for SwitchViewController in Main.storyboard and commented the above code. App Failed with same error when I moved to this tab
I am using iOS 8 and Xcode 7. Kindly help

ViewControllerwas missing therootViewControllerrelationship fromNavigationControllerthat caused this issue.