how to force RTL on UITabBarCountroller in IOS?

Viewed 487

i am building an app in english , and i want to support Arabic also

I am not using any default Localization or internationalization in my app because i don't need them instead, i am doing it manually

every thing is perfect but i can not figure out hoe to make the UITabBar go from the right to left I don't want the whole app to go from rtl , only the UITabBarController

ex : my tabBar now is like this :

tab1 : home tab2 : search tab3 : settings

when the user change language inside the app , i want the tab bar to go like this :

tab1 : settings tab2 : search tab3 : Home

note that i am using storyBoard to make my UI

thank you very much for your help

1 Answers

I Found the answer to my problem

it turned out that you can force RTL or LTR on any specific view like this :

YourView.semanticContentAttribute = .forceRightToLeft  // RTL
YourView.semanticContentAttribute = .forceLeftToRight  // LTR
Related