iOS9 - Force left to right

As we know, in Arabic system, iOS 9 will mirror some controls layout's automatically. Not only that, I also notice that UINavigationController push animation is changed ( It will animate from right to left ).


Since I don't want iOS to do that, is there any way to force it like before?


I found UISemanticContentAttributeForceLeftToRight constant in iOS 9 . How should I use this ?



Thanks in advance

I'm afraid I'll have to answer your question with another question... could you share the particular reason why you would not want to provide a consistent UI according to the app language's writing direction for your customers? This is potentially confusing to users of your app; we recommend judicious use of .ForceLeftToRight, if at all necessary in the first place.

Sure


Within my app, there is an in-app language selection. I know that Apple recommended it another way ( from Settings->General->Language ), but our management requires it. We have made this and we may add some other language like Tagalog, which is not available in system language. Since our app does not depend on iOS language, we wouldn't want iOS to change layout and animation automatically. That is the reason. Is this possible ?


And I still don't know about using .ForceLeftToRight or UISemanticContentAttributeForceLeftToRight. Could you explain it more ? Or maybe redirect me to the docs about it


Thanks

I think I got it now. I use:

[[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];


And this solve all my problems above


Hope this can help for anyone with similar case

Hi, where did you add this line of code, [[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];


Or I have to put it in every controller ?

iOS9 - Force left to right
 
 
Q