# swiftui-gestures

Guides gesture implementation in SwiftUI, from tap and drag recognition to multi-gesture composition and conflict handling.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4000 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/swiftui-gestures/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/swiftui-gestures

## What it does

This skill provides instructions for implementing and reviewing SwiftUI gestures under modern Swift 6.3 patterns. It details basic gestures like `TapGesture` and `LongPressGesture`, alongside continuous interactions using `DragGesture`, `MagnifyGesture`, and `RotateGesture`.

It guides gesture composition using `.simultaneously(with:)`, `.sequenced(before:)`, and `.exclusively(before:)`. For transient animations, it enforces `@GestureState` to automatically reset values once a touch interaction finishes.

Layouts, lists, and broader state architecture are outside its boundary and require separate skills. It targets modern APIs starting with iOS 17, replacing deprecated types like `MagnificationGesture`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/swiftui-gestures/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/swiftui-gestures/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/swiftui-gestures/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/swiftui-gestures/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills swiftui-gestures
```

2. **Manually: put the files in place**
- File: `.github/skills/swiftui-gestures/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/swiftui-gestures
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/swiftui-gestures/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/swiftui-gestures/SKILL.md

## When to use it
- combine zoom and rotation gestures simultaneously on a view
- chain a long press before starting a drag interaction
- migrate deprecated MagnificationGesture to MagnifyGesture
- manage transient interaction offsets with @GestureState

## Example prompts
- Combine pinch-to-zoom and rotation gestures on an image using simultaneously
- Implement a drag gesture that only activates after a successful long press
- Update this view from MagnificationGesture to iOS 17 MagnifyGesture with @GestureState

## Similar
- [swiftui-patterns](https://affpapa.org/en/nevibecode/skills/affaan-m-swiftui-patterns.md) — skill · 4600 installs
- [swiftui-motion](https://affpapa.org/en/nevibecode/skills/swiftui-motion.md) — skill · 943 installs
- [swiftui-whats-new-27](https://affpapa.org/en/nevibecode/skills/swiftui-whats-new-27.md) — skill · 737 installs
- [guide-swiftui-animations](https://affpapa.org/en/nevibecode/skills/guide-swiftui-animations.md) — skill · 347 installs
- [swiftui-specialist](https://affpapa.org/en/nevibecode/skills/swiftui-specialist.md) — skill · 864 installs
- [swiftui-development](https://affpapa.org/en/nevibecode/skills/swiftui-development.md) — skill · 676 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
