diff --git a/ProjectClock/AlarmViewController.swift b/ProjectClock/AlarmViewController.swift index 4c85ed4..3e9b7fb 100644 --- a/ProjectClock/AlarmViewController.swift +++ b/ProjectClock/AlarmViewController.swift @@ -93,7 +93,8 @@ class AlarmTableCell: UITableViewCell // Display Hour, Minute, and AM or PM ampm.text = alarm.hour < 12 || alarm.hour == 24 ? "AM" : "PM" - let hour = alarm.hour <= 12 ? alarm.hour : alarm.hour - 12 + var hour = alarm.hour <= 12 ? alarm.hour : alarm.hour - 12 + hour = alarm.hour == 0 ? 12 : alarm.hour time.text = String(format: "%i:%02i", hour, alarm.minute) // displays the specific days alarm is activated diff --git a/ProjectClock/Models.swift b/ProjectClock/Models.swift index 4808b23..02c8728 100644 --- a/ProjectClock/Models.swift +++ b/ProjectClock/Models.swift @@ -48,13 +48,17 @@ let wvms = [ ] -struct Tone{ +struct Tone: Codable{ let name: String let tone: SystemSoundID } -let ringtones : [Tone] = [Tone(name: "Item One", tone: SystemSoundID(1005)), Tone(name: "Item Two", tone: SystemSoundID(1254))] //SystemSoundID(1255),SystemSoundID(1256),SystemSoundID(1257)] + +let ringtones = [ + Tone(name: "Item One", tone: SystemSoundID(1005)), + Tone(name: "Item Two", tone: SystemSoundID(1254)) +] //SystemSoundID(1255),SystemSoundID(1256),SystemSoundID(1257)] class Alarm: Codable, Equatable {