Change the Listing Order of the View Controllers in Xcode Storyboard

Change the listing order of the view controllers in Xcode storyboard

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.

Reordering view controllers in a UITabBarController, all defined in a Storyboard

Sample Image

you can simply drag and drop and resort them with the mouse in the storyboard. it still works in 4.5.1

EDIT

maybe you have first to switch the storyboard view to "Source Code" and go back before you can drag. right-click the storyboard file and select "Open as" -> "Source Code" and then back again "Open as" -> "Interface Builder - iOS Storyboard". that should do the trick.

EDIT

Does not work in Xcode 4.5.2 anymore for me!

EDIT

In Xcode 5 preview 5 it works again. Seems that Apple did fix this bug in the new verion

Sample Image

How to rearrange order of ViewControllers in Storyboard tree in Xcode 6?

The order is defined by the order of the scenes in the XML (Right Click -> Open As.. -> Source Code) under the scenes node.

Sample Image

Note that on this XML, the "Splash" scene is first, followed by two navigation controllers and this is what is shown in the normal storyboard view.

<scenes>
<!--Splash-->
<scene sceneID="tne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="ane-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>

<!--Navigation Controller-->
<scene sceneID="bne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
</scenes>

Sample Image

Here however, I moved the scene node for splash below the navigation controllers and it updated the storyboard view accordingly.

<scenes>
<!--Navigation Controller-->
<scene sceneID="ane-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>

<!--Navigation Controller-->
<scene sceneID="bne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
<!--Splash-->
<scene sceneID="tne-QT-ifu">
<objects>
<!-- other data -->
</objects>
<point key="canvasLocation" x="-876" y="-1364"/>
</scene>
</scenes>

Sample Image

How sort storyboard's view controllers alphabetically by name or locate a VC in storyboard quickly?

If you know the name of the view controller, you can type it in the space at the very bottom of the document outline. It has a small half filled in circle in it. If you don't know the whole name type in something like it and it will list VC's with similar titles. Hope this helps you out.

How to change the initial view controller of storyboard?

Tap the second view controller, and select "Is initial View Controller" in Attributes inspector.

Sample Image

Rearranging Tab Bar Controller Order in StoryBoard

In 4.5 save the storyboard after adding a Controller, switch to another file and then back to the Storyboard and the tab dragging should work again.



Related Topics



Leave a reply



Submit