我在我的应用程序中使用 NSLocalization,不幸的是, View 没有将其框架的原点切换为 RTL。
对于阿拉伯语,图像应该位于标签的左侧,但它不会出现在整个应用程序中。只有标签改变了文本对齐方式,其他一切都一样。
为什么它没有发生。对于阿拉伯语,我也设置了语义:
[[UITextView appearance]setTextAlignment:NSTextAlignmentRight]
[[UITableViewCell appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft];
对于英语:
[[UITextView appearance]setTextAlignment:NSTextAlignmentLeft];
[[UITableViewCell appearance]setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
最佳答案
你必须有“Leading”和“Trailing”两个约束(而不是 Left 和 Right ),你最好使用 Masonry 。当您有一些约束时,您可以使用 SemanticContentAttribute。
关于ios - UITableViewCell 不会为 RTL objective-c 翻转 subview ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44042150/