iOS Gestures & Interactions skill

| Gesture | Standard Action |

by wondelai·MIT license·★ 2,235 Stars on the repo·GitHub ↗

Use now

Files of iOS Gestures & Interactions

wondelai/main1 file
gestures.md
Show the full text49 lines
ios-gestures-interactions/gestures.md49 lines · 1.2 KB

iOS Gestures & Interactions

Standard Gestures (Never Override)

Gesture Standard Action
Swipe right from left edge Navigate back
Swipe down on modal Dismiss modal
Pull down on list Refresh content
Swipe left on row Reveal actions (delete, etc.)
Pinch Zoom in/out
Long press Context menu

Haptic Feedback

Provide tactile feedback for meaningful interactions:

// Impact feedback (physical actions)
let impact = UIImpactFeedbackGenerator(style: .medium)
impact.impactOccurred()

// Notification feedback (outcomes)
let notification = UINotificationFeedbackGenerator()
notification.notificationOccurred(.success)  // or .warning, .error

// Selection feedback (UI changes)
let selection = UISelectionFeedbackGenerator()
selection.selectionChanged()

Animation Guidelines

  • Use spring animations for natural, bouncy feel
  • Respect reduceMotion accessibility setting
  • Keep animations brief and purposeful
@Environment(\.accessibilityReduceMotion) var reduceMotion

var animation: Animation {
    reduceMotion ? .none : .spring()
}

withAnimation(animation) {
    // Animate property changes
}
1# iOS Gestures & Interactions
2 
3## Standard Gestures (Never Override)
4 
5| Gesture | Standard Action |
6|---------|-----------------|
7| Swipe right from left edge | Navigate back |
8| Swipe down on modal | Dismiss modal |
9| Pull down on list | Refresh content |
10| Swipe left on row | Reveal actions (delete, etc.) |
11| Pinch | Zoom in/out |
12| Long press | Context menu |
13 
14## Haptic Feedback
15 
16Provide tactile feedback for meaningful interactions:
17 
18```swift
19// Impact feedback (physical actions)
20let impact = UIImpactFeedbackGenerator(style: .medium)
21impact.impactOccurred()
22 
23// Notification feedback (outcomes)
24let notification = UINotificationFeedbackGenerator()
25notification.notificationOccurred(.success) // or .warning, .error
26 
27// Selection feedback (UI changes)
28let selection = UISelectionFeedbackGenerator()
29selection.selectionChanged()
30```
31 
32## Animation Guidelines
33 
34- Use spring animations for natural, bouncy feel
35- Respect `reduceMotion` accessibility setting
36- Keep animations brief and purposeful
37 
38```swift
39@Environment(\.accessibilityReduceMotion) var reduceMotion
40 
41var animation: Animation {
42 reduceMotion ? .none : .spring()
43}
44 
45withAnimation(animation) {
46 // Animate property changes
47}
48```
49 

Discussion