How can I rearrange UITabBarController items using the Storyboard?
IosIphoneXcodeStoryboardIos Problem Overview
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
Ios Solutions
Solution 1 - Ios
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
Solution 2 - Ios
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.
Solution 3 - Ios
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.
Solution 4 - Ios
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)
Solution 5 - Ios
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.
Solution 6 - Ios
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>
Solution 7 - Ios
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.
Solution 8 - Ios
Click and drag worked for me with Xcode 6.2 with the correct zoom level.
Solution 9 - Ios
Using Xcode 5 and above you should just drag and drop them: