Pull-to-Refresh
Reload data with the refreshable modifier.
Refreshing on Demand
Users expect to pull a list down to reload it. SwiftUI bakes this gesture in with a single modifier, no gesture code required. ✨
Meet refreshable
Attach the refreshable modifier to a List. Pulling down reveals a spinner and runs the async work you provide.
.refreshable {
await reload()
}All lessons in this course
- Swipe-to-Delete Rows
- Reordering with onMove
- Adding New Items
- Pull-to-Refresh