File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/react-native-bottom-tabs/ios/TabView Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,15 @@ struct NewTabView: AnyTabView {
1212 @ViewBuilder
1313 var body : some View {
1414 var effectiveLayoutDirection : LayoutDirection {
15- if let layoutDirectionString = props. layoutDirection {
16- return layoutDirectionString == " rightToLeft " ? . rightToLeft : . leftToRight
17- }
18- return . leftToRight
15+ let dir = props. layoutDirection ?? " locale "
16+ if let mapped = [ " rtl " : LayoutDirection . rightToLeft ,
17+ " ltr " : LayoutDirection . leftToRight ] [ dir ] {
18+ return mapped
1919 }
20+ let system = UIView . userInterfaceLayoutDirection ( for: . unspecified)
21+ return system == . rightToLeft ? . rightToLeft : . leftToRight
22+ }
23+
2024 TabView ( selection: $props. selectedPage) {
2125 ForEach ( props. children) { child in
2226 if let index = props. children. firstIndex ( of: child) ,
You can’t perform that action at this time.
0 commit comments