rtl in swift code example
Example: rtl ios swift
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
}
}