Closed orihpt closed 3 years ago
Hi, thanks for your help! Overall, looks very promising, I've made just a few "cosmetic" comments, nothing structurally important has been left.
I also suggest that next time you should use constraints instead of points on the screen, it would make everything way easier. Thanks for reviewing! π
It's a good idea, CalendarKit uses frame calculations instead of AutoLayout in some parts mainly for legacy reasons. All of new code is written with AutoLayout if possible.
Looking forward to you adding the changes I've requested and then merging and releasing your change as a part of the new CalendarKit.
Please check if it's okay now
Hi, this looks great, thanks for the quick fixes!
I found few other major UI issues that need to be fixed before merging:
Please, modify it to support RTL languages as well, if you'd like editing to be included in your pull request. Although, this one is not a deal breaker and your PR is good to go after fixing the first issue.
The style property could also be renamed to leadingInset
to reflect the change required to support this feature.
About this Pull Request and why it's important
As you may know, in apps that their language is written right-to-left, the layout is mirrored to match the text. In this Pull Request, I added RTL support for the layout, and transitions. That means that the layout will be mirrored when the language is written right-to-left, as it should have been.
Preview
Hebrew (written right-to-left)
English (written left-to-right)
to show that the layout remains the same in LTR languages
It's important to remember that this will happen automatically in RTL languages. In all the other languages everything will remain the same.
What did I add RTL support to
I added RTL support to:
If I forgot something please comment and I'll add support for it.
How can the code know if the app language is written RTL
I used the next code to determine that:
I found it working even if the app language is different than the device language.
I also suggest that next time you should use constraints instead of points on the screen, it would make everything way easier. Thanks for reviewing! π