Apparently ScrollView inside RTL NavigationStack has a bug. iOS 16.4 and Xcode 14.3. (iOS 16.3 works fine)
var body: some View {
NavigationStack {
ScrollView(.horizontal) {
HStack {
// given that items width smaller than scrollview width
ForEach(0..<5) {
Text("\($0)")
.padding(.horizontal)
}
}
}
.navigationTitle("ScrollView RTL NavigationStack")
}
.environment(\.layoutDirection, .rightToLeft)
}
The issue is animation bug where is jumps as if starting position is left, then jumps back to the expected starting position of right.
Selecting any option will automatically load the page