Skip to content

Instantly share code, notes, and snippets.

@froggomad
Created July 3, 2021 23:15
Show Gist options
  • Save froggomad/6993fad534e36c502bb73daf3157d501 to your computer and use it in GitHub Desktop.
Save froggomad/6993fad534e36c502bb73daf3157d501 to your computer and use it in GitHub Desktop.
import AudioToolbox.AudioServices
enum TapticEngine: UInt32 {
/// 'Peek' feedback (single weak boom)
case peek = 1519
/// 'Pop' feedback (single strong boom)
case pop = 1520
/// 'Cancelled' feedback (three sequential weak booms)
case cancelled = 1521
/// provide haptic feedback to the user
func tapUser() {
AudioServicesPlaySystemSound(rawValue)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment