Xcode - iOS - Navigation System Controller Arrangement

I created segues like this:

  • the VC1 view controller is the root view controller.
  • a segue from a view controller from VC1 to VC2

There is a section in Xcode that shows the navigation controller scene (as shown in the app)

screen shot of the navigation controller scene, pls see the red rectangle

The navigation controller script is displayed in the following order:

  • VC2
  • Navigation controller
  • VC1


While everything works as expected, I would like to change the display order of the nav controller scene.

Navigation controller order does not reflect how the segments are connected

Is there a way to manually change the order without having to remove the view controllers and recreate them (see attached file)?


source to share

1 answer

Open the storyboard file with a text editor (it's XML) and look for something like then you will see:

   <scene sceneID="...">
<!--Navigation Controller-->
   <scene sceneID="..">


Just change the order ^^


By "reordering" I mean an average regrouping of the entire block, be careful not to mess up your file.



All Articles