70
votes

Hi I have a UITabBarController in XCode 4.5 as the root controller with many tabs I need to change the order to.

The only thing that works for me is remove the relationships and add them again in the desired order that I want the tabbar items to appear.

Is there another way to do this?

thanks

9

9 Answers

168
votes

In the storyboard highlight the tab bar controller.

Make sure you are zoomed in enough and that a blue box is around the tab bar controller.

Then click on the tabs and drag them around to where you want them

24
votes

I solved this by right-clicking on the storyboard -> open as source code, and then rearranged the "segue" xml-blocks in the order I wanted them to be.

11
votes

xcode 4.5, drag and drop failed. as suggested by another, close xcode and restart xcode. after this drag and drop of tabBarItems worked perfectly to rearrange order.

5
votes

I could not drag and tabs around while i had the tab bar controller as root view of navigation controller. I had to delete the navigation controller and restart xcode (4.5.2)

3
votes

Some of the suggestions above worked for me sometimes, but not always. Even rebooting the Mac did not help.
The only way I found that works always is deleting all segues from the tab bar controller to its child view controllers, and reconnecting them in the right order.

3
votes

When working with Xamarin iOS Designer, I open the .storyboard file in a text editor and locate the <tabBarController ...> node. Then I rearrange the order of the segues in the <connections> section:

<connections>
    <segue destination="274" kind="relationship" relationship="viewControllers" id="286"/>
    <segue id="943" destination="910" kind="relationship" relationship="viewControllers"/>
    <segue destination="147" kind="relationship" relationship="viewControllers" id="159"/>
</connections>
2
votes

1) Make sure you are zoomed in enough and that a blue box is around the tab bar controller.

2) Then click on the tabs and drag them around to where you want them.

3) if it is not working , just click on any .h or .m file and then go to storyboard file and try.

4) even though it is not working , just restart xcod and try it.

1
votes

Click and drag worked for me with Xcode 6.2 with the correct zoom level.

enter image description here

0
votes

Using Xcode 5 and above you should just drag and drop them:

enter image description here