Skip to content

Commit 84c9241

Browse files
authored
Update README.md
1 parent f4d9e9e commit 84c9241

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)