Closed mineschan closed 5 years ago
Hey @mineschan thank you so much for reporting this. Indeed the percent-based api is wrong with leading
& trailing
attributes at the moment. Turns out using multipliers with leading and trailing attributes doesn't allow us to reach our goal. Thankfully there is a way (there always is!). This is via UILayoutGuide
. We can transparently introduce a UILayoutGuide
with a percent-based width and then pin constraints on it.
// |-[layoutGuide(== x % width)-[view]
This has the advantage to work gracefully with RTL mode :)
UILayoutGuide
is iOS 9.0 only so we'll have to raise our support (from iOS 8.0), but it's not a big deal since iOS 8.0 has been long dead and buried.
Going to update the release and let you know when you can try it out.
@mineschan the release has been updated with the fix, let me know how this goes :)
Thanks @s4cha !!
I tested with leading(%) and trailing(%) mix with leading(x) / trailing (x) / left(x) / right(x), all works perfectly!! You make my life so much easier :D
@mineschan Very happy to help ๐ !!! Thanks a ton for your help and reactivity, this is very much appreciated ๐
Youre welcome! Just, dont mind me that I brought you some coffee๐
@mineschan Thank you so much for the donation ๐. Have a fantastic Day !!!
Firstly, thanks @s4cha a lot for the work on RTL support in 4.7.0 Able to use chainable api and visual formatting (|-10-label-|) in the RTL project I'm working on now!
However the
leading
trailing
withSteviaPercentage
is not working properly. This also happened when I try to support it in my fork.