[O] Loop alarm sound + vibration
This commit is contained in:
@@ -10,9 +10,17 @@ import AVFoundation
|
||||
|
||||
class AlarmActivationViewController: UIViewController
|
||||
{
|
||||
var timer: Timer?
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(AlarmActivationViewController.playSound), userInfo: nil, repeats: true)
|
||||
}
|
||||
|
||||
@objc func playSound()
|
||||
{
|
||||
AudioServicesPlayAlertSound(SystemSoundID(1005))
|
||||
AudioServicesPlayAlertSound(kSystemSoundID_Vibrate)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user