swiftui-gestures

Implement and migrate SwiftUI gestures across iOS views.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/harshav167/build-ios-apps --skill swiftui-gestures-harshav167
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-gestures
Source: https://github.com/harshav167/build-ios-apps/tree/main/skills/swiftui-gestures
Command: npx skills add https://github.com/harshav167/build-ios-apps --skill swiftui-gestures-harshav167

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Implement, review, or improve SwiftUI gesture handling to enable interactive and accessible UIs with proper state management and conflict resolution.

Core Features & Use Cases

  • Gesture composition with simultaneously, sequenced, and exclusively
  • Manage transient state using @GestureState
  • Resolve parent/child conflicts using highPriorityGesture or simultaneousGesture
  • Build reusable custom Gesture conformances
  • Migrate from MagnificationGesture and Rotation to MagnifyGesture and RotateGesture
  • Apply to SwiftUI views to create responsive and accessible interfaces

Quick Start

Open a SwiftUI project and apply taps, drags, magnifications, and rotations using the SwiftUI gestures APIs to create interactive views.

Frequently Asked Questions about swiftui-gestures

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

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

Resolve SwiftUI gesture conflicts by applying highPriorityGesture or simultaneousGesture to manage parent and child view interactions. This ensures proper conflict resolution when multiple gestures compete for touch recognition.

What is the best way to manage transient state during a drag gesture in SwiftUI?

Manage transient SwiftUI gesture state using the @GestureState property wrapper. It automatically resets to its initial value when a gesture, such as a drag, ends or gets cancelled, ensuring clean state transitions.

How do I compose multiple gestures like tap and drag simultaneously in SwiftUI?

Compose SwiftUI gestures using simultaneously, sequenced, or exclusively modifiers to combine tap, drag, magnify, and rotate interactions. This allows you to build complex, multi-touch user interfaces.

How do I migrate from MagnificationGesture to MagnifyGesture in SwiftUI?

Migrate from MagnificationGesture and Rotation to the newer MagnifyGesture and RotateGesture APIs in SwiftUI. This update aligns your app with modern gesture protocols for handling pinch and rotation interactions.

Can I build custom reusable gestures using the SwiftUI Gesture protocol?

Build reusable custom gestures by conforming to the SwiftUI Gesture protocol. This allows you to encapsulate complex interaction logic and apply it across multiple views for consistent behavior.