I am making an app in English having UITabbarController
. Now i want the same app in Arabic as well. So i need to flip the tabs that were initially from right to left - to - left to right. Is it possible?
Asked
Active
Viewed 358 times
2

Cœur
- 37,241
- 25
- 195
- 267

ScarletWitch
- 522
- 6
- 23
-
What do you mean by flipping the tabs? the position of the tabbar items or the way the characters flow? – d3p0nit May 23 '13 at 08:41
-
1Like- If in English app, the first tab from left is home tab, in arabic, we should have the home tab as the first tab from right and so on. – ScarletWitch May 23 '13 at 08:46
3 Answers
1
_So this is how I would basically position my tabbar items in my app.
I'm doing this in every
-(id)initWithCoder:(NSCoder *)aDecoder
Method of the ViewController-Class presenting the Item.
self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Home" image:nil tag:0];
[[self tabBarItem] setFinishedSelectedImage:[UIImage imageNamed:@"Home_icon"]
withFinishedUnselectedImage:[UIImage imageNamed:@"Home_icon_selected"]];
// move text up
self.tabBarItem.titlePositionAdjustment = UIOffsetMake(0.0, -4.0);
// set color for text
[[self tabBarItem] setTitleTextAttributes:@{
UITextAttributeTextColor:[UIColor colorWithRed:0.253 green:0.243 blue:0.226 alpha:1.000],
NSFontAttributeName:LCFontStyleNTabBarText}
forState:UIControlStateNormal];
[[self tabBarItem] setTitleTextAttributes:@{
UITextAttributeTextColor:[UIColor whiteColor],
NSFontAttributeName:LCFontStyleNTabBarText}
forState:UIControlStateSelected];

d3p0nit
- 442
- 5
- 16
0
There are a couple of ways to achieve it:
First, you can create a separate application for it, in Arabic.
Second, you can dynamically add tabs in your iphone app. See example.

TelKitty
- 3,146
- 3
- 18
- 21
-
1Thanks yiz for such prompt reply. I will implement it and get back to you. thanks :) – ScarletWitch May 23 '13 at 08:48
0
You might want to detect the device language character direction: iOS: Determine if device language is Right to Left (RTL)
And then reverse the array of the view controllers before assigning it to the tab bar controller if the language character direction is right to left.

Community
- 1
- 1

Valent Richie
- 5,226
- 1
- 20
- 21