Skip to content

Commit e02926e

Browse files
authored
Update README.md
1 parent 2c8f262 commit e02926e

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
@@ -516,6 +516,35 @@ Actually if you don't use `.contentShape(Rectangle())`, you can also add `.conte
516516

517517
</details>
518518

519+
<details>
520+
<summary>How to add swpe hint.</summary>
521+
522+
Use modifier `.swipeHint`:
523+
524+
```swift
525+
ForEach(range, ...) {
526+
YourCell()
527+
...
528+
.addFullSwipeAction(
529+
menu: .slided,
530+
swipeColor: .red,
531+
state: $state) {
532+
Leading {
533+
...
534+
}
535+
Trailing {
536+
...
537+
}
538+
}
539+
.swipeHint(cell == range.first, hintOffset: 120.0) // for trailing <== LOOK HERE
540+
.swipeHint(cell == range[1] , hintOffset: -120.0) // for leading <== LOOK HERE
541+
...
542+
}
543+
```
544+
545+
</details>
546+
547+
519548
## Communication
520549

521550
- If you **found a bug**, open an issue or submit a fix via a pull request.

0 commit comments

Comments
 (0)