From 33c617378540c4348deae91e81f236e4f7064781 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 17 Jan 2021 15:48:07 -0500 Subject: [PATCH] [+] Play sound when alarm is activated --- .../AlarmActivationViewController.swift | 18 +++++++++++++ ProjectClock/Base.lproj/Main.storyboard | 26 +++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 ProjectClock/AlarmActivationViewController.swift diff --git a/ProjectClock/AlarmActivationViewController.swift b/ProjectClock/AlarmActivationViewController.swift new file mode 100644 index 0000000..2e72dc6 --- /dev/null +++ b/ProjectClock/AlarmActivationViewController.swift @@ -0,0 +1,18 @@ +// +// AlarmActivationViewController.swift +// ProjectClock +// +// Created by Hykilpikonna on 1/17/21. +// + +import UIKit +import AVFoundation + +class AlarmActivationViewController: UIViewController +{ + override func viewDidLoad() + { + super.viewDidLoad() + AudioServicesPlayAlertSound(SystemSoundID(1005)) + } +} diff --git a/ProjectClock/Base.lproj/Main.storyboard b/ProjectClock/Base.lproj/Main.storyboard index 90e8e24..ae54743 100644 --- a/ProjectClock/Base.lproj/Main.storyboard +++ b/ProjectClock/Base.lproj/Main.storyboard @@ -592,15 +592,37 @@ - + - + + + + + + + + + + + + +