swiftui-gestures

Implement SwiftUI gesture interactions with @GestureState and gesture composition.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill swiftui-gestures-roy-wonji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-gestures
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/swift-ios-skills/skills/swiftui-gestures
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill swiftui-gestures-roy-wonji

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you implement SwiftUI gestures reliably by preventing common issues like gesture conflicts, transient state bugs, and deprecated APIs.

Core Features & Use Cases

  • Modern gesture handling: Implements tap, long-press, drag, magnify, rotate, and related discrete/continuous behaviors for iOS 13+ and iOS 17+.
  • Safe state management: Uses @GestureState for transient gesture feedback that automatically resets, while using @State for persisted interaction values.
  • Gesture composition & conflict resolution: Combines gestures with simultaneously/sequenced/exclusively and resolves parent-child precedence using highPriorityGesture, simultaneousGesture, and GestureMask.
  • Reusable patterns: Creates custom Gesture conformances by composing existing gestures into reusable interaction primitives.

Quick Start

Use the swiftui-gestures skill to implement a pinch-to-zoom + pan interaction in SwiftUI with transient gesture state via @GestureState and correct gesture conflict handling.

Frequently Asked Questions about swiftui-gestures

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

FAQPage Schema
How do I resolve SwiftUI gesture conflicts between parent and child views?

Resolve SwiftUI gesture conflicts by using highPriorityGesture, simultaneousGesture, and GestureMask to establish parent-child recognition precedence across view hierarchies without blocking touch input.

How do I manage transient state during a DragGesture in SwiftUI?

Manage transient DragGesture state with @GestureState and the updating modifier to provide temporary visual feedback that resets automatically when the touch interaction ends.

Can I combine tap, drag, and magnify gestures simultaneously in SwiftUI?

You can compose multiple SwiftUI gestures using simultaneously, sequenced, or exclusively modifiers to combine tap, drag, magnify, and rotate interactions into a single cohesive behavior.

Why should I use MagnifyGesture instead of MagnificationGesture in SwiftUI?

Use MagnifyGesture and RotateGesture instead of deprecated alternatives to ensure modern, reliable continuous gesture recognition for pinch-to-zoom interactions on iOS 13+ and iOS 17+.

What is the best way to build a reusable custom gesture in SwiftUI?

Build reusable custom SwiftUI gestures by conforming to the Gesture protocol and composing existing drag, magnify, or tap interactions into reusable interaction primitives.

How does @GestureState differ from @State when handling SwiftUI gestures?

Use @GestureState for transient gesture values that reset automatically upon completion, and @State for persisted interaction values that remain after the touch input lifecycle ends.