我正在内部切换应用程序语言 (LTR-RTL),然后重新初始化 Storyboard。
这是一段代码:
let semanticContentAttribute: UISemanticContentAttribute = language == .Arabic ? .ForceRightToLeft : .ForceLeftToRight
UIView.appearance().semanticContentAttribute = semanticContentAttribute
UINavigationBar.appearance().semanticContentAttribute = semanticContentAttribute
问题是,所有呈现的 View Controller 在关闭时都会卡住 3-6 秒。
这是什么原因造成的?
最佳答案
不支持在 appearance()
代理上设置 semanticContentAttribute
。您将遇到许多其他问题和错误,因为应用程序仍然认为它运行的语言不是您要覆盖的语言。
向您的应用添加语言切换器只会让应用变得更加困惑;用户希望他们的应用程序遵循其设备设置的语言。
关于ios - 挂起(卡住)问题 UISemanticContentAttribute = .ForceRightToLeft,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41565402/