我使用下面的代码来调整我的应用程序的RTL语言,但后退按钮箭头不像其他组件那样保持镜像。
代码:
if ([NSLocale characterDirectionForLanguage:languageCode] == NSLocaleLanguageDirectionRightToLeft) {
if ([[[UIView alloc] init] respondsToSelector:@selector(setSemanticContentAttribute:)]) {
[[UIView appearance] setSemanticContentAttribute: UISemanticContentAttributeForceRightToLeft];
}
}
else {
if ([[[UIView alloc] init] respondsToSelector:@selector(setSemanticContentAttribute:)]) {
[[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
}
}
我有什么办法可以让它对后退按钮箭头有用吗?