swiftship/internal/skills/data/watchos/gestures/SKILL.md
watchOS gesture patterns: Digital Crown, long press, swipe-to-dismiss, tap, watch-appropriate interactions. Use when implementing watchOS-specific patterns related to gestures.
npx skillsauth add abdullah4ai/apple-dev-docs 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 (watchOS):
| Gesture | SwiftUI API | Use Case |
|---------|-------------|----------|
| Tap | Button() | Primary actions |
| Long press | .onLongPressGesture | Secondary actions |
| Digital Crown | .digitalCrownRotation() | Value adjustment, scrolling |
| Swipe left/right | System back gesture | Navigation back |
| Scroll | ScrollView / List | Vertical content scrolling |
BUTTON VS ONTAPGESTURE:
Button() for tappable elements — same rule as iOSDIGITAL CROWN:
@State private var crownValue: Double = 0
ScrollView {
content
}
.digitalCrownRotation(
$crownValue,
from: 0,
through: 100,
by: 1,
sensitivity: .medium,
isContinuous: false,
isHapticFeedbackEnabled: true
)
DIGITAL CROWN FOR VALUE SELECTION:
@State private var selectedIndex: Double = 0
VStack {
Text("Temperature")
Text("\(Int(selectedIndex + 60))\u{00B0}F")
.font(AppTheme.Fonts.title2)
}
.digitalCrownRotation(
$selectedIndex,
from: 0,
through: 40,
by: 1,
sensitivity: .low,
isHapticFeedbackEnabled: true
)
LONG PRESS:
Button("Action") { primaryAction() }
.onLongPressGesture {
secondaryAction()
}
NOT AVAILABLE ON watchOS:
LIST DELETE:
List {
ForEach(items) { item in
ItemRow(item: item)
}
.onDelete { indexSet in
items.remove(atOffsets: indexSet)
}
}
CONFIRMATION FOR DESTRUCTIVE ACTIONS:
.confirmationDialog("Delete?", isPresented: $showConfirm) {
Button("Delete", role: .destructive) { delete() }
Button("Cancel", role: .cancel) { }
}
RULES:
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.