Search code examples
iosswiftxcodeuiviewcontrollerright-to-left

How to make a single UIViewController Right To Left (RTL) in iOS?


I need to make one of my view controllers RTL in my application. I found a way that makes whole application RTL but I don't want tab bar and other view controllers to become RTL. Any solution would be great appreciated.


Solution

  • Set semanticContentAttribute for view in your view controllers as:

    view.semanticContentAttribute = .forceRightToLeft