Post

Replies

Boosts

Views

Activity

RTL Layout Issue on iPhone Duo Simulator (iOS 27.1) When Switching App Language to Arabic
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. ### Environment - 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) ### Problem Description 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: ```swift 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. ### Questions 1. Is using `UIAppearance` to set `semanticContentAttribute` globally a recommended approach for app-level RTL language switching in UIKit? 2. Could this configuration affect safe-area insets, layout margins, or Auto Layout behavior on iPhone Duo? 3. Would `traitOverrides.layoutDirection` be a better approach for controlling the layout direction when the app language differs from the system language? 4. If `traitOverrides.layoutDirection` is 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? 5. Are there any iPhone Duo-specific layout behaviors or known issues that developers should consider when implementing RTL support? 6. 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
Topic: UI Frameworks SubTopic: UIKit
1
0
29
1d
RTL Layout Issue on iPhone Duo Simulator (iOS 27.1) When Switching App Language to Arabic
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. ### Environment - 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) ### Problem Description 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: ```swift 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. ### Questions 1. Is using `UIAppearance` to set `semanticContentAttribute` globally a recommended approach for app-level RTL language switching in UIKit? 2. Could this configuration affect safe-area insets, layout margins, or Auto Layout behavior on iPhone Duo? 3. Would `traitOverrides.layoutDirection` be a better approach for controlling the layout direction when the app language differs from the system language? 4. If `traitOverrides.layoutDirection` is 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? 5. Are there any iPhone Duo-specific layout behaviors or known issues that developers should consider when implementing RTL support? 6. 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
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
0
Views
29
Activity
1d