Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to re-order segues in initial view's tabbar controller in xcode 4.5?

Tags:

How do I reorder the initial view's tabbar controller elements without having to delete all the segues and re connect them manually in the desired order? Is there a way to change the order of these after they have been hooked up?

I was able to do this by just dragging them around in xcode 4.4 but that option seems to be non available in xcode 4.5.

Hopefully, this is possible from within the storyboard mode. But if it's only possible programmatically, that's ok too, just looking for any proper way to accomplish this without having to delete them all and re hook them up. enter image description here

For example, how would I move the 'Home' item to first position?

like image 324
iamtoc Avatar asked Sep 26 '12 08:09

iamtoc


People also ask

How do I add a Viewcontroller to the tab bar controller in storyboard?

To add a tab, first drag a new View Controller object to the storybard. Next control-drag from the tab bar controller to new view controller and select view controllers under Relationship Segue . Your tab bar controller will update with a new tab.

What is tab bar controller in Swift?

Overview. The tab bar interface displays tabs at the bottom of the window for selecting between the different modes and for displaying the views for that mode. This class is generally used as-is, but may also be subclassed. Each tab of a tab bar controller interface is associated with a custom view controller.


1 Answers

The positions in each view are associated with the positions on the bottom bar of the Tab Bar Controller. If you reorder that bar you will reorder your views. You can reorder them by drag and drop on your interface builder.

In your example just select Home in your Tab Bar Controller and drag it to the first position.

If you have problems dragging and dropping try to select first your Tab View Controller or exit your XCode and open it again (like @thepumpkin1979 and @Rick pointed out).

like image 79
Tiago Almeida Avatar answered Sep 22 '22 15:09

Tiago Almeida