0PricingLogin
SwiftUI Academy · Lesson

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

  1. Swipe-to-Delete Rows
  2. Reordering with onMove
  3. Adding New Items
  4. Pull-to-Refresh
← Back to SwiftUI Academy