Hello Apple Developer Community,
We are adapting our UIKit-based iOS application for iPhone Duo and have encountered an unexpected layout issue when switching the app language to Arabic. We would appreciate any guidance from Apple engineers or developers who have experience with RTL layout behavior on this device form factor.
- Device: iPhone Duo Simulator
- OS: iOS 27.1 (official release, non-beta)
- Xcode: 27.1 (official release, non-beta)
- Framework: UIKit
- Layout system: Auto Layout
- Device system language: English (LTR)
- App language: Arabic (RTL)
Our application supports changing the app language independently of the device's system language.
When the system language is English and the app language is Arabic, we configure the semantic content attributes of several UIKit classes globally:
let cAttribute: UISemanticContentAttribute =
language.isRTL ? .forceRightToLeft : .forceLeftToRight
UIView.appearance().semanticContentAttribute = cAttribute
UIButton.appearance().semanticContentAttribute = cAttribute
UICollectionView.appearance().semanticContentAttribute = cAttribute
UITableView.appearance().semanticContentAttribute = cAttribute
UITableViewHeaderFooterView.appearance().semanticContentAttribute = cAttribute
After applying these settings, we observe a large, unexpected blank area along the left side of the interface on the iPhone Duo simulator. Multiple screens are affected, and views positioned using Auto Layout appear to leave additional space on the left, resembling an unexpected safe-area inset or margin.
When the app language is English, the layout behaves as expected. The issue occurs when the app language is Arabic while the device system language remains English.
We have not yet determined whether this is related to semantic content attributes, trait propagation, Auto Layout, safe-area behavior, or a device-specific layout consideration.
-
Is using
UIAppearanceto setsemanticContentAttributeglobally a recommended approach for app-level RTL language switching in UIKit? -
Could this configuration affect safe-area insets, layout margins, or Auto Layout behavior on iPhone Duo?
-
Would
traitOverrides.layoutDirectionbe a better approach for controlling the layout direction when the app language differs from the system language? -
If
traitOverrides.layoutDirectionis appropriate, where should it be applied—for example, on the root view controller or a container view controller—to ensure that the intended layout direction propagates correctly to descendant views? -
Are there any iPhone Duo-specific layout behaviors or known issues that developers should consider when implementing RTL support?
-
What implementation strategy does Apple recommend for supporting in-app language switching between LTR and RTL languages in an existing UIKit application?
Our goal is to support Arabic and other RTL languages reliably without introducing unintended spacing or layout changes, while keeping the device's system language unchanged.
Any suggestions, documentation references, sample code, or insights into the underlying behavior would be greatly appreciated.
Thank you for your time and help!
Best regards,
iOS Development Team