swiftship/internal/skills/data/ui/gestures/SKILL.md
Gesture patterns: tap, swipe actions, long press, drag, context menus, gesture priority, haptic pairing. Use when implementing UI patterns related to gestures.
npx skillsauth add abdullah4ai/apple-developer-toolkit gesturesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
STANDARD GESTURE TABLE:
| Gesture | SwiftUI API | Use Case | |------------|-----------------------|----------------------------------| | Tap | Button() | Primary actions, navigation | | Long press | .contextMenu | Secondary actions, previews | | Swipe | .swipeActions | List row actions (delete, edit) | | Drag | .draggable/.dropDest | Reorder, drag-and-drop | | Pull | .refreshable | Refresh content | | Pinch | MagnifyGesture | Zoom images/maps | | Rotate | RotateGesture | Rotate content |
BUTTON VS ONTAPGESTURE:
SWIPE ACTIONS (list rows):
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
Button(role: .destructive) {
deleteItem(item)
} label: {
Label("Delete", systemImage: "trash")
}
}
.swipeActions(edge: .leading) {
Button {
toggleFavorite(item)
} label: {
Label(item.isFavorite ? "Unfavorite" : "Favorite",
systemImage: item.isFavorite ? "star.slash" : "star.fill")
}
.tint(.yellow)
}
CONTEXT MENUS:
.contextMenu {
Button("Edit", systemImage: "pencil") { edit(item) }
Button("Share", systemImage: "square.and.arrow.up") { share(item) }
Divider()
Button("Delete", systemImage: "trash", role: .destructive) { delete(item) }
}
GESTURE PRIORITY:
HAPTIC FEEDBACK PAIRING:
CONFIRMATION FOR DESTRUCTIVE ACTIONS:
.confirmationDialog("Delete Item?", isPresented: $showDelete) {
Button("Delete", role: .destructive) { delete(item) }
Button("Cancel", role: .cancel) { }
}
PULL-TO-REFRESH:
SCROLL GESTURES:
testing
Use for 3D games: racing, 3D sports, board games, marble maze, tower defense, bowling. SceneKit + SceneView architecture, 3D scene hierarchy, physics, game loop, primitives, materials, cameras, particles, audio.
documentation
Game UI patterns: SwiftUI HUD overlays on SpriteKit, menus (main/pause/game-over), virtual joystick/d-pad, score displays, health bars, tutorial onboarding.
tools
Download free game sprites/textures/3D models and generate procedural assets. Covers nw_download_asset tool, texture factories, sprite atlas organization, 3D model loading, and programmatic asset creation.
testing
Use for 2D games: arcade, puzzle, sports, ping pong, platformer, shooter, 2D racing. SpriteKit + SpriteView architecture, scene hierarchy, physics, game loop, audio, particles, game feel.