I am making an app that vibrates with customizable breaks in between. I have a slider that is numbered 0-50. And it rounds it to the closest integer then displays it in my label. I am now trying to execute the command:
@IBOutlet weak var amount: UILabel!
@IBAction func slider1(_ sender: UISlider) {
amount.text = String(Int(sender.value));
}
@IBAction func vibrator(_ sender: UISlider) {
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
(the wait goes here but I don't know how to add it)
}
also if possible in the wait command i want to divide the label value by 10. it doesn't have to be specifically the wait command, just something to delay it.
Thanks in advance!