我们的应用程序支持 RTL 语言,如阿拉伯语、波斯语。
iOS 9 之后,导航控制器和选项卡栏控制器的行为已更改。我只找到这个链接ios-9-禁用从右到左语言的支持 https://stackoverflow.com/questions/31697426/ios-9-disable-support-for-right-to-left-language为了解决这个问题
我把这段代码写在我的appDelegate
它工作正常,导航栏和标签栏设置为 LTR。
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0")) {
[[UINavigationBar appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
[[UITabBar appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
}
But 我的问题是:
我无法更改交互式弹出手势 Direction 。
我在同样的问题上苦苦挣扎,终于找到了解决方案
你只需要为navigationController.view设置SemanticContentAttribute
在 rootViewController 的 viewDidLoad 中:
[self.navigationController.view setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
[self.navigationController.navigationBar setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)