Files of iOS Gestures & Interactions
wondelai/
gestures.md
Show the full text49 lines
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
reduceMotionaccessibility 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 | |
| 16 | Provide tactile feedback for meaningful interactions: |
| 17 | |
| 18 | |
| 19 | // Impact feedback (physical actions) |
| 20 | let impact = UIImpactFeedbackGenerator(style: .medium) |
| 21 | impact.impactOccurred() |
| 22 | |
| 23 | // Notification feedback (outcomes) |
| 24 | let notification = UINotificationFeedbackGenerator() |
| 25 | notification.notificationOccurred(.success) // or .warning, .error |
| 26 | |
| 27 | // Selection feedback (UI changes) |
| 28 | let selection = UISelectionFeedbackGenerator() |
| 29 | selection.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 | |
| 39 | @Environment(\.accessibilityReduceMotion) var reduceMotion |
| 40 | |
| 41 | var animation: Animation { |
| 42 | reduceMotion ? .none : .spring() |
| 43 | } |
| 44 | |
| 45 | withAnimation(animation) { |
| 46 | // Animate property changes |
| 47 | } |
| 48 | |
| 49 |
Discussion
Browse more free Claude skills.