I’m seeing inconsistent right-to-left behavior when using the new SwiftUI swipeActionsContainer() API with a ScrollView.
The swipe-action buttons are positioned correctly according to the layout direction, but the gesture direction itself is not mirrored.
Minimal reproducible example:
import SwiftUI
struct ContentView: View {
var body: some View {
ScrollView {
LazyVStack {
Text("Hello, World!")
.padding()
.frame(maxWidth: .infinity)
.background(.blue.quinary)
.swipeActions {
Button(role: .destructive) {
// Delete action
} label: {
Label("Delete", systemImage: "trash")
}
}
}
.padding()
}
.swipeActionsContainer()
}
}
Steps to reproduce:
- Run the example using a left-to-right language such as English.
- Swipe the row from right to left.
- The trailing swipe actions appear correctly.
- Change the app language to Arabic.
- Swipe the row from left to right, which should reveal the trailing actions in an RTL layout.
- Nothing happens.
- Swipe from right to left instead.
- The actions appear, but from the correct visually mirrored edge.
Expected behavior:
Because the default swipe-action edge is .trailing, both the action placement and the gesture direction should follow the current layout direction:
- English/LTR: swipe from right to left.
- Arabic/RTL: swipe from left to right.
Actual behavior:
The action buttons visually respect the RTL layout, but the gesture recognizer still requires the LTR swipe direction.
Environment:
- Xcode: 27.0 RC
- iOS: 27.0 RC
- Device: iPhone 17
- Swift language version: Swift 6