Quickly create haptic feedback using this module.
Use Swift Package Manager to install this package:
https://github.com/benlmyers/quick-haptic
In your View or ViewController, first import QuickHaptic
:
import QuickHaptic
Play a single light haptic:
Haptic.play(.light)
Play two soft haptics rapidly in succession:
Haptic.double(.soft)
Play a heavy haptic, then a medium haptic:
Haptic.double(.heavy, .medium)
QuickHaptic supports every type of FeedbackStyle
offered.
Available Styles:
- heavy
- light
- medium
- rigid
- soft