The application is configured to navigate, but when I configure the view transition

let sb = UIStoryboard(name: "Main", bundle: nil) let initialVC = sb.instantiateViewController(withIdentifier: "viewContr") self.present(initialVC, animated: true, completion: nil) 

viewContr opens, but navigation is missing.

  • What is meant? What is in the moment? - VAndrJ
  • Thank. I solved the problem. - Igor Ivanov

1 answer 1

Push the navigation controller, in the context of your piece of code it will look something like this:

 if let navigation = self.navigationController { navigator.pushViewController(initialVC, animated: true) } 
  • Something doesn't work ((((I can set the controller in the initialVC nav, but then the wrong viewController will open, but the navigation will be. - Igor Ivanov
  • No need to create new navigation controllers, reach the root and push it. - Dmitry Steshin