File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -569,6 +569,35 @@ ForEach(range, ...) {
569569
570570</details>
571571
572+ # ## Supporting Right to left
573+
574+ This Library supports right-to-left languages like Arabic and Hebrew.
575+
576+ Check it by adding `.environment(\.layoutDirection, .rightToLeft)` to your view with swipe actions.
577+
578+ <details>
579+ <summary>Look for the example</summary>
580+
581+ ` ` ` swift
582+ struct ContentView: View {
583+ var body: some View {
584+ LazyVStack {
585+ ForEach(0..<5) { index in
586+ Text("Item \( index)")
587+ .swipeActions {
588+ Button("Delete") {
589+ print("Item deleted")
590+ }
591+ .tint(.red)
592+ }
593+ }
594+ }
595+ .environment(\. layoutDirection, .rightToLeft) // <= Look here
596+ }
597+ }
598+ ` ` `
599+
600+ </details>
572601
573602# # Communication
574603
You can’t perform that action at this time.
0 commit comments