[+] Add button to delete all alarms

This commit is contained in:
Hykilpikonna
2021-01-17 16:27:51 -05:00
parent d01d56b6ef
commit 2cd464c890
2 changed files with 93 additions and 88 deletions
+7
View File
@@ -67,4 +67,11 @@ class TestingViewController: UIViewController
alarms.list.append(Alarm(hour: h, minute: m, text: "Test alarm - \(h * m)", wakeMethod: wvms[0]))
alarms.localSave()
}
@IBAction func deleteAlarm(_ sender: Any)
{
let alarms = Alarms.fromLocal()
alarms.list.removeAll()
alarms.localSave()
}
}