TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8.02k stars 1.29k forks source link

RTL Support #189

Open garrettmoon opened 7 years ago

garrettmoon commented 7 years ago

From @WiesnerPeti on February 7, 2017 8:18

Hi guys,

I tried to google this, also searched the FAQ section, but I could not find the answer for the question above. In the FAQ it is clearly stated that the library does not support AutoLayout (that supports RTL automatically), does that mean, that there is now way to switch to RTL mode , let's say in a layout spec?

I tried to test a sample project with RTL turned ON and all the texts are mirrored, but the layout is not.

Thank you very much for the answer in advance! :)

Copied from original issue: facebookarchive/AsyncDisplayKit#2996

garrettmoon commented 7 years ago

Hey @WiesnerPeti RTL isn't something we support yet, but we definitely think it would be an awesome feature of layout specs! We'd gladly accept pull requests supporting this goal.

noamalffasy commented 5 years ago

Hi! I would like to know if there's a way to get the UI's layout direction inside layoutSpecThatFits. Currently Apple provides a way to get it with effectiveUserInterfaceLayoutDirection but it is only available in the main thread.

If there isn't a way to do it then maybe adding a property for it would solve the issue, you could just check if it's RTL or not and layout it properly.