Ashraf Tawfeeq
Ashraf Tawfeeq

Reputation: 3029

Changing the UI on the fly - iOS

As far as i know, Auto-layout supports both RTL and LTR for the current held device language. But i need to my UI elements to support LTR according to a language selection button . Is there any possible way to reload the UI using Autolayout?

Upvotes: 1

Views: 163

Answers (1)

Cocoadelica
Cocoadelica

Reputation: 3026

Make two arrays as properties, holding the constraints for LTR layout and RTL layout. Depending on the selected state you remove one set from the view and add the other.

It means doing programmatic auto layout but that's not really too bad. The guide provided in the docs is an easy read.

Upvotes: 1

Related Questions