I want to display a navigation controller programmatically. This code works perfect on iOS 8, but on iOS 9 it doesn't work.
var vc = storyboard?.instantiateViewControllerWithIdentifier("view_controller_id") as! UIViewController;
var nc = UINavigationController()
nc.setViewControllers([vc], animated: false)
navigationController?.pushViewController(nc, animated: true)
After that I am getting this error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'