How can I invoke vibration using Swift and control its duration? Also what other parameters can be defined? I would like to invoke a very short vibration using Swift.
I tried the following function:
func () {
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
}
but I get this error:
'Int' is not convertible to 'SystemSoundID'
This would be a better solution:
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With