Reputation: 310
I'm developing an iOS App for an Right-to-left language by using Tab Bar. Normally, when I try to start the application, the application will start from the left bar item.
My prblem is, I'm trying to let the application start from the right bar item.
I mean, for example, there are 4 items in the application, like [1 - 2 - 3 - 4]. When I run the application, it will open item "1". But, I'm trying to let the application run by opening item "4".
I'm using Xcode 6 and Objective C.
Upvotes: 0
Views: 66
Reputation: 3463
Tab bars will, by default, set the first item as the selected one unless you specify otherwise (either in code or in your storyboard / xib file). You can programmatically select the current item on your tab bar. For example:
[tabBar setSelectedItem:[tabBar.items objectAtIndex:4]];
Just keep in mind that the indices start at 0 so the indices are 0-1-2-3 and not 1-2-3-4.
Upvotes: 1