我的应用程序同时支持英语和阿拉伯语。interactivePopGestureRecognizer
使用英语时可以正常工作,即从左向右滑动时,它会弹出 viewController。但是当我使用阿拉伯语时,我已经semanticContentAttribute
从右到左改变了。
if([[[NSUserDefaults standardUserDefaults] objectForKey:@"LanguageCode"] isEqualToString:@"en"])
{
[[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight]; //View for English language
}
else
{
[[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft]; //mirror view for Arabic language
}
但interactivePopGestureRecogniser
仍然是从左到右。我怎样才能改变interactivePopGestureRecogniser
它支持阿拉伯语的方向?我想从右向左滑动以使用阿拉伯语弹出视图控制器。