swiftui-gestures

Build and debug SwiftUI gesture interactions with composition and priority patterns.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/jperezdelreal/GymBro --skill swiftui-gestures-jperezdelreal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-gestures
Source: https://github.com/jperezdelreal/GymBro/tree/main/.squad/skills/ios/swiftui-gestures
Command: npx skills add https://github.com/jperezdelreal/GymBro --skill swiftui-gestures-jperezdelreal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SwiftUI gesture handling can be complex due to composition, priority rules, and transient state management; this skill guides implementing, reviewing, and debugging gesture interactions to build robust UIs.

Core Features & Use Cases

  • Compose and manage TapGesture, LongPressGesture, DragGesture, MagnifyGesture, and RotateGesture across views.
  • Resolve conflicts with highPriorityGesture and simultaneousGesture; create reusable custom Gesture conformances; migrate deprecated Magnification/Rotation to MagnifyGesture/RotateGesture for iOS 17+.
  • Use GestureState for ephemeral feedback and ensure responsive, accessible interactions across iOS devices.

Quick Start

Implement and review SwiftUI gesture handling in an iOS project, covering TapGesture, LongPressGesture, DragGesture, MagnifyGesture, and RotateGesture, including complex composition.

Frequently Asked Questions about swiftui-gestures

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compose multiple SwiftUI gestures like DragGesture and MagnifyGesture on the same view?

SwiftUI gesture composition combines DragGesture and MagnifyGesture using simultaneous, sequenced, or exclusive patterns. Applying these composition strategies resolves interaction conflicts and builds robust, responsive user interfaces across iOS views.

What is @GestureState used for in SwiftUI gesture handling?

@GestureState manages transient state for SwiftUI gesture handling, providing ephemeral feedback during interactions. It automatically resets to its initial value when a gesture sequence ends, ensuring responsive and clean user interface updates.

How do I resolve SwiftUI gesture conflicts when using TapGesture and LongPressGesture together?

Resolve SwiftUI gesture conflicts between TapGesture and LongPressGesture by applying highPriorityGesture or simultaneousGesture modifiers. These modifiers adjust recognition priority and allow concurrent tracking to prevent interactions from blocking each other.

How do I migrate deprecated MagnificationGesture to MagnifyGesture for iOS 17?

Migrate deprecated MagnificationGesture to MagnifyGesture for iOS 17 by updating your gesture declarations to the newer equivalents. This ensures continued compatibility and maintains responsive pinch-to-zoom interactions within your SwiftUI views.

Why does my SwiftUI DragGesture stop responding when another view intercepts the touch?

SwiftUI DragGesture stops responding when another view intercepts the touch due to gesture priority conflicts. Apply highPriorityGesture to enforce recognition or simultaneousGesture to allow concurrent tracking across overlapping views.