Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
iOS 27 adds reordering to any list, stack, grid, or custom layout, not only List + onMove. SwiftUI draws the drag preview, placeholder, and drop animation. Your code applies the change to the model.
Mark the ForEach with .reorderable() and the enclosing container with reorderContainer(for:isEnabled:move:). Use reorderContainer(for:itemID:isEnabled:move:) when the model is not Identifiable or another property is the ID.
ScrollView {
VStack {
ForEach(cards) { card in
CardView(card: card)
}
.reorderable()
}
.reorderContainer(for: Card.self) { difference in
cards.apply(difference: difference)
}
}move runs once at the end of the reorder session with a ReorderDifference:
sources: IDs of moved items, in selection order. Handle all of them, not only sources[0].destination.position: .before(id) or .end.Tag each group and name the collection ID type on the container. Signature: reorderContainer(for:in:isEnabled:move:), requires Item: Identifiable, CollectionID: Hashable & Sendable.
ForEach(section.cards) { card in
CardView(card: card)
}
.reorderable(collectionID: section.id)
// On the container
.reorderContainer(for: Card.self, in: Section.ID.self) { difference in
let destinationSectionID = difference.destination.collectionID
// remove moved items from their sections, insert at destination.position
}For drag-out only (copy to another area, export), values must be Transferable.
draggable(containerItemID:) on each itemdragContainer(for:) on the grid; closure maps dragged IDs to model valuesdragContainerSelection(_:) includes the current selection when one selected item is draggeddropDestination(for:isEnabled:action:) on the targetonDragSessionUpdated(_:) for phase and locationLazyVGrid(columns: [GridItem(.adaptive(minimum: 120))]) {
ForEach(cards) { card in
CardView(card: card).draggable(containerItemID: card.id)
}
}
.dragContainer(for: Card.self) { ids in cards.filter { ids.contains($0.id) } }
.dragContainerSelection(selectedIDs)Drag containers do not reorder. Drag container APIs now work on iPhone and iPad.
ArrangementView (iOS 27.1+) lays out a primary and secondary view and adapts to size class, orientation, and reserved regions such as a fold or camera. Styles: .split (separate spaces) and .overlay.
ArrangementView {
NowPlayingView()
} secondary: {
LyricsView()
}
.arrangementViewStyle(.split)Tuning: .split.axes(.vertical), overlayArrangementEdge(_:), splitArrangementLayoutRatio(_:), splitArrangementFixedLayoutSize(horizontal:vertical:), splitArrangementLayoutSize(...). GeometryProxy can query ReservedRegions. Gate with #available(iOS 27.1, *).
#available(iOS 27, *); keep List + onMove for iOS 26.move; the view does not mutate the array itself.OutlineGroup does not support native reordering yet..tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avfoundation-audio
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-haptics
references
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
debugging-instruments
device-integrity
references
energykit
references
eventkit
family-controls
references
financekit
focus-engine
gamekit
git-branching-workflow
references
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
quicklook
references
realitykit
references
relevancekit
references
scenekit
sensorkit
shazamkit
references
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
swift-concurrency
swift-formatstyle
references
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references