对于按钮图标的RTL支持,您需要在运行时提供图像,如:
//MARK: - Locale identifiers enum LOCALE_IDENTIFIERS: String { case arabic = "ar-SA" case hindi = "hi" case urdu = "ur" case english = "en" } CURRENT_LANGUAGE = LOCALE_IDENTIFIERS.urdu.rawValue /* Assume the CURRENT_LANGUAGE will return the current selected language */ /*This is what you need. The above code is just for making the sense*/ var iconName = "" if Locale.characterDirection(forLanguage: CURRENT_LANGUAGE) == Locale.LanguageDirection.rightToLeft { iconName = "ic_back_button_RTL" }else { iconName = "ic_back_button_LTR" } let backButtonImage: UIImage = UIImage(named: iconName)! //Use this backButtonImage for your button. /*The "ic_back_button_RTL" is an icon like: -> */ /*The "ic_back_button_LTR" is an icon like: <- */