Search code examples
iosios7storyboardautolayout

Change from LTR to RTL with storyboard on iOS 7


So, i've been looking anywhere an explanation about how to implement Mirroring on Storyboard's Auto Layout - not programmatically.

I have an app that support a few languages and when i turn the language to Hebrew, for example, i have a label that change it's text to hebrew. so far so good. what i want to do next is to change the label's place like a mirror. Can anyone help me understand how to do it on Storyboard Auto Layout? Thanks.


Solution

  • After doing some research, i found the answer: First, you have to implement an Internationalization. you can follow Ray's Wenderlich tutorial for Internationalization by enter this link: http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014 .

    Now, on Storyboard, all you have to do is putting some constraints to your label: put trailing and leading constraints to the label you want to reflect like a mirror when the user switch the language, and that's it.

    It's much more easy then design a new Storyboard and you're using the elements that Apple gave you, so i guess it's the right way too.

    Hope it helps.