LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

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.

741stars40forksUpdated 6/15/2026
Developer Tools#ios#gestures#mobile-development#touch-interaction#swift#swiftui

Security Assessment

Safe(100/100)
Security Score100/100

About swiftui-gestures

This skill provides comprehensive guidance for implementing, reviewing, and improving SwiftUI gesture handling in iOS applications targeting iOS 26 and above. It addresses the common challenges developers face when working with touch interactions, including recognizing taps, long presses, drags, pinch-to-zoom, and rotation gestures. The skill ensures developers use modern gesture APIs correctly, avoid deprecated patterns, and handle complex gesture interactions with proper state management and conflict resolution.

The skill covers all major SwiftUI gesture types including TapGesture for single and multi-tap detection, LongPressGesture for press-and-hold interactions, DragGesture for tracking finger movement, and the modern MagnifyGesture and RotateGesture (iOS 17+) that replace older deprecated APIs. It provides detailed guidance on gesture composition techniques using simultaneously, sequenced, and exclusively modifiers, as well as transient state management with @GestureState for visual feedback during gesture recognition. The skill also addresses parent-child gesture conflicts through highPriorityGesture and simultaneousGesture modifiers.

This skill is essential for iOS developers building interactive SwiftUI applications, particularly those working on photo editing apps, drawing tools, gaming interfaces, or any application requiring sophisticated touch interactions. It's especially valuable when migrating legacy code from deprecated gesture APIs to modern Swift 6.3 patterns, building custom gesture recognizers conforming to the Gesture protocol, or debugging gesture conflicts in complex view hierarchies. The skill includes a review checklist and common mistakes section to help ensure robust, maintainable gesture implementations.

FAQ

What's the difference between discrete and continuous gestures?

Discrete gestures like TapGesture and LongPressGesture fire once when recognized and only support .onEnded callbacks. Continuous gestures like DragGesture, MagnifyGesture, and RotateGesture stream updates throughout the interaction and support .onChanged, .onEnded, and .updating callbacks for real-time feedback.

Why should I use MagnifyGesture instead of MagnificationGesture?

MagnificationGesture is deprecated in modern iOS versions. MagnifyGesture (iOS 17+) is the recommended replacement that provides the same pinch-to-zoom functionality with improved API design and better integration with Swift 6.3 patterns.

When should I use @GestureState versus @State for gesture tracking?

@GestureState is designed for transient state that should automatically reset when the gesture ends, making it ideal for visual feedback during gestures. Use @State for persistent state that should remain after the gesture completes, such as final positions or accumulated transformations.

How do I resolve conflicts when child and parent views both have gestures?

Use highPriorityGesture on the child view to make it respond first, or use simultaneousGesture to allow both parent and child gestures to recognize simultaneously. The gesture composition modifiers (simultaneously, sequenced, exclusively) provide fine-grained control over how multiple gestures interact.

What iOS version is required to use this skill's recommendations?

This skill targets iOS 26+ with Swift 6.3 patterns, though most gestures are available from iOS 13+. MagnifyGesture and RotateGesture specifically require iOS 17+. Always check the compatibility table in the skill documentation for specific gesture requirements.

All Files

2 files
SKILL.md14.4 KB
View
references/gesture-patterns.md13.7 KB
View

Install swiftui-gestures

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

dpearson2699/swift-ios-skills

Related Skills

short-form-video

14

multi-asset-morning-briefing

7,907

content-strategy

2,901

doherty-threshold

2,901