Check out example codes for "rtl ios swift". It will help you in understanding the concepts better.

Code Example 1

func switchViewControllers(isArabic arabic : Bool){

        if arabic {
            UIView.appearance().semanticContentAttribute = arabic ? .forceRightToLeft : .forceLeftToRight
            let appDelegate = UIApplication.shared.delegate as? AppDelegate
            let homeViewController = HomeViewController()
            appDelegate?.window?.rootViewController = homeViewController
         }
}

Learn ReactJs, React Native from akashmittal.com