Skip to content

Instantly share code, notes, and snippets.

@stephen-francis
Last active April 28, 2017 17:29
Show Gist options
  • Select an option

  • Save stephen-francis/14e0a16e194051ec27297ff9de829673 to your computer and use it in GitHub Desktop.

Select an option

Save stephen-francis/14e0a16e194051ec27297ff9de829673 to your computer and use it in GitHub Desktop.
import AudioToolbox.AudioServices
func vibrate() {
AudioServicesPlaySystemSoundWithCompletion(kSystemSoundID_Vibrate) {
// do what you'd like now that the sound has completed playing
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment