swiftui-gestures

Coordinate SwiftUI gesture composition and state handling for iOS and macOS apps.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/femitz/flyby --skill swiftui-gestures-femitz
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swiftui-gestures
Source: https://github.com/femitz/flyby/tree/main/.agents/skills/swiftui-gestures
Command: npx skills add https://github.com/femitz/flyby --skill swiftui-gestures-femitz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Coordinate and optimize SwiftUI gesture interactions across multiple gesture types.

Core Features & Use Cases

  • Support for TapGesture, LongPressGesture, DragGesture, MagnifyGesture, RotateGesture, and SpatialTapGesture with clear composition patterns
  • Gesture composition strategies: simultaneously, sequenced, exclusively, plus conflict resolution and transient state management with @GestureState
  • Guidance on building reusable custom Gesture conformances and migrating from deprecated rotation/magnification gestures

Quick Start

Start by identifying the gestures your UI requires and implement them with proper state handling and composition, then test in a sample view.

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 drag and magnify simultaneously?▼

Compose multiple SwiftUI gestures simultaneously using simultaneousGesture or sequenced modifiers, allowing concurrent recognition of DragGesture and MagnifyGesture on a single interactive view.

What is @GestureState used for in SwiftUI gesture handling?▼

@GestureState in SwiftUI gesture handling is a transient state property wrapper that resets automatically when a gesture ends, enabling safe tracking of gesture progress and conflict resolution without permanent view state mutations.

How do I resolve conflicts between TapGesture and DragGesture in SwiftUI?▼

Resolve SwiftUI gesture conflicts between TapGesture and DragGesture using exclusive composition or sequenced patterns, ensuring the system prioritizes the correct gesture based on touch event sequencing and safe defaults.

Can I create custom Gesture conformances in SwiftUI for interactive views?▼

Yes, you can build reusable custom Gesture conformances in SwiftUI by implementing the Gesture protocol, enabling specialized recognition patterns and optimized event sequencing for interactive iOS and macOS views.

How do I migrate from deprecated SwiftUI magnification and rotation gestures?▼

Migrate from deprecated SwiftUI magnification and rotation gestures by adopting MagnifyGesture and RotateGesture, applying proper @GestureState handling and composition strategies to maintain interactive view reliability.

Does SwiftUI SpatialTapGesture work with gesture composition on iOS?▼

SpatialTapGesture works within SwiftUI gesture composition patterns on iOS, allowing you to sequence or combine spatial tap detection with other gestures like DragGesture while managing transient state effectively.