【问题标题】:Disable RTL on specific UIViewController in iOS在 iOS 中的特定 UIViewController 上禁用 RTL
【发布时间】:2021-11-28 08:17:55
【问题描述】:

有没有办法在特定的 ViewController 中禁用从右到左?我尝试将语义内容属性强制为从左到右,但它不起作用。

self.view.semanticContentAttribute = .forceLeftToRight

【问题讨论】:

    标签: ios swift swift3 localization left-to-right


    【解决方案1】:

    在您的视图中添加此代码确实加载了-:

     UIView.appearance().semanticContentAttribute = .forceLeftToRight
    

    【讨论】:

    • 这将改变整个应用程序而不是特定的 ViewController
    • 当您在特定控制器上添加此代码时,它将仅更改特定视图控制器视图。
    • 你能出示你的代码吗
    猜你喜欢
    • 1970-01-01
    • 2015-06-06
    • 2019-07-18
    • 1970-01-01
    • 1970-01-01
    • 2015-01-16
    • 2013-08-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多