I am creating an app with multiple storyboards. Right now, I am able to transition from the first storyboard to the second but when I transition to the second storyboard, I lose my navigation controller. However, I still need to navigate back to the first storyboard and would like to use the same controller. Does anyone know how to keep my navigation controller between storyboards?
Here's how I'm transitioning to my second storyboard. The pushViewController is my attempt to add to the navigation stack, but it doesn't work.
let destination = UIStoryboard(name: "Preferences", bundle: nil)
let initialViewController = destination.instantiateInitialViewController() as! UIViewController
self.navigationController?.pushViewController(initialViewController, animated: true)
self.presentViewController(initialViewController, animated: true, completion: nil)
I think U just add redundant code. delete
this code will present View not in the navigation container starker. This code make
do not work.
So just use