Agent skill · software engineering · dpearson2699

swiftui-gestures

Implement, review, or improve SwiftUI gesture handling. Use when adding tap, long press, drag, magnify, or rotate gestures, composing gestures with simultaneously/sequenced/exclusively, managing transient state with @GestureState, resolving parent/child gesture conflicts with highPriorityGesture or simultaneousGesture, building custom Gesture protocol conformances, or migrating from deprecated MagnificationGesture to MagnifyGesture or using the newer RotateGesture.

Why this skill is useful

Provides detailed guidance on implementing and managing SwiftUI gestures, including niche commands and state management techniques not commonly known.

What it needs

About 6k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.

What this skill does

SwiftUI Gestures (iOS 26+) Review, write, and fix SwiftUI gesture interactions. Apply modern gesture APIs with correct composition, state management, and conflict resolution using Swift 6.3 patterns. Scope boundary: This skill owns SwiftUI gesture recognition, composition, gesture state, and gesture-specific accessibility alternatives. Broader SwiftUI architecture/state ownership belongs in swiftui-patterns; list, scroll, form, and control layout belongs in swiftui-layout-components; broad UIKit bridging belongs in swiftui-uikit-interop. When correcting Apple API availability, deprecation, or behavior claims, cite the relevant Sosumi or official Apple documentation URL in the response. Contents Gesture Overview TapGesture LongPressGesture DragGesture MagnifyGesture (iOS 17+) RotateGesture (iOS 17+) Gesture Composition @GestureState Adding Gestures to Views Custom Gesture Protocol Common Mistakes Review Checklist References Gesture Overview Gesture Type Value Since --- --- --- --- TapGesture Discrete Void iOS 13 LongPressGesture Discrete Bool iOS 13 DragGesture Continuous DragGesture.Value iOS 13 MagnifyGesture Continuous MagnifyGesture.Value iOS 17 RotateGesture Continuous RotateGesture.Value iOS 17 SpatialTapGesture Discrete SpatialTapGesture.Value iOS 16 Discrete gestures fire once (.onEnded). Continuous gestures stream updates (.onChanged, .onEnded, .updating). TapGesture Recognizes one or more taps. Use the count parameter for multi-tap. LongPressGesture Succeeds after the user holds for minimumDuration. Fails if finger moves beyond maximumDistance. With visual feedback via @GestureState + .updating(): Shorthand: .onLongPressGesture(minimumDuration:perform:onPressingChanged:). DragGesture Tracks finger movement. Value provides startLocation, location, translation, velocity, and predictedEndTranslation. DragGesture.Value.velocity is available with DragGesture from iOS 13+; do not confuse it with iOS 17+ gesture types such as MagnifyGesture and RotateGesture. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills dpearson2699/swiftui-gestures

View the source on GitHub

Browse the @skills marketplace