Change the listing order of the view controllers in Xcode storyboard

In Xcode 11 you just open storyboard XML and move specific "scene" to proper place under "scenes" tag. And that's it. The order will correspond to Document outline.


In Xcode 5, the order of the view controllers/scenes listed in the storyboard's "Document Outline" seems to be determined by an alphanumeric sorting of the sceneID attribute values in the storyboard XML file.

After upgrading to Xcode 5 from 4.6 the Document Outline seemed to list my scenes in a random order. I inspected the Storyboard XML file (right click on storyboard file -> Open As -> Source Code) but the order of the scenes was correct. After further investigation I realized the sceneID attribute values were the issue. I found each sceneID attribute and added an alphanumerically increasing prefix to the value. For example, for the first scene that should appear in the Document Outline I prefixed its sceneID value with a "1a", for the second "1b", for the third "1c" and so on. After doing that for all my scenes, they had a proper listing order in the Document Outline.

I think the sceneID values are probably only used for unique identification/ordering purposes, so hopefully changing them doesn't cause other unexpected problems. But I'm still able to work with the storyboard in Interface Builder without problems and my app seems to work normally. So if this problem is irritating you as much as it did me, you might consider this workaround until Apple gives us a proper solution... just be sure to make a backup first!


In the Document Outline, drag the orange view controller icon. As you do this you will see the blue horizontal insertion point appear between the grey boxes. Let go and the whole grey group box for the view controller will relocate.