A list you reorder by dragging: rows lift, the others part, and the drop settles with a spring.
Drag to reorder outside edit mode: a long press lifts a row with a shadow and a tilt, the rows part to open the gap, a drop indicator tracks the target index, edges auto-scroll, and release settles it with a spring.
$199 once, every piece included. See how installing works · Sign in
SwiftUI source you own, built on Apple frameworks only.
How it behaves, what it handles, and the decisions behind it.
Hold a row and it lifts out of the stack, scaling up, tilting slightly and taking a shadow with it. The rows it passes step aside to open a gap, a dashed indicator marks the index it would land at, and releasing settles it there with a spring. Drag into the top or bottom edge of the list and it auto-scrolls a row at a time, carrying the target index along, so a long list can be reordered end to end in one gesture.
.onMove: no List, no edit mode, no EditButton. Rows are your own views and the gesture is a LongPressGesture sequenced before a DragGesture, so a plain tap still reaches whatever is inside the row.rowHeight, which is what makes the index math exact: one slot is the row plus the spacing, and the target index is the drag offset rounded to whole slots.rowHeight, spacing, cornerRadius, liftScale, liftTilt, liftShadow and indicator.ReorderListExample at the end of ReorderList.swift is the screen shown in the preview; copy it as a starting point.Pieces that work well next to this one.