nicklockwood / layout

A declarative UI framework for iOS
MIT License
2.23k stars 97 forks source link

RTL support? #115

Closed igor-makarov closed 6 years ago

igor-makarov commented 6 years ago

I am wondering about support for right-to-left (RTL) languages. From what I understand, this library is based on UIKit's frame-based layout, which does not support RTL. For RTL, Apple suggests using auto layout's leading and trailing anchors for everything, unless the UI is sensitive to handedness - player controls, navigation, etc. How can we go about implementing leading and trailing properties on LayoutNode in a way that's transparent? Thought?

nicklockwood commented 6 years ago

This is something I’ve been considering for a while, but haven’t gotten around to yet.

I’ll try to get a solution for it into the next release.

nicklockwood commented 6 years ago

@igor-makarov version 0.6.19 (just released) includes support for using leading/trailing instead of left/right. Let me know if you have any problems with it.