RTL logic is not applied when the cell uses the `.subtitle` style
danielsaidi opened this issue · comments
If you apply RTL to an action sheet, it doesn't affect cells that use the .subtitle
style.
I can fix that. But I think the correct logic should also change cell semanticContentAttribute
so that the whole objects ( imageView
, ... ) direction changes to right to left like this :
So my question is should I make a difference between this and just changing textLabel
's alignment?
or just setting the alignment to right to left should change the whole direction?. Basically I'm asking is there a possibility that someone needs to change text alignment to RTL without changing the whole thing?
The only problem will remain is .center
alignment for cells with .subtitle
style which can be fixed by adding labels' constraints to correct anchors
This problem happened because In .subtitle
style label's are aligned to left anchor of the cell (or imageView
if it's present) and their size depends on the text so .right
or .center
had no effect on them because the label's trailing was not attached to cells trailing. Its actually the default behavior of UITableViewCell
which is wired !
So here is the result for .center
after fix
If the semantic approach alone solves this, I think that would be so much better than having to set text alignment.
Thanks a lot for your quick response 🙏
I think that the bug fix in 3.1.3 will solve this problem.