Swipe-to-Delete Rows
Remove items with onDelete.
Lists That Can Lose Rows
A static list just shows data. Real apps let people remove items, and SwiftUI makes deletion feel native with a simple swipe. ✨
Meet onDelete
The onDelete modifier attaches to a ForEach inside a List. It enables the swipe-left gesture that reveals a red Delete button.
All lessons in this course
- Swipe-to-Delete Rows
- Reordering with onMove
- Adding New Items
- Pull-to-Refresh