Need help adding two UIPickers to one view

This commit is contained in:
Andrew
2021-01-27 00:09:48 -05:00
parent 1b8ba32c3f
commit fcf3c6d312
2 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -93,7 +93,8 @@ class AlarmTableCell: UITableViewCell
// Display Hour, Minute, and AM or PM // Display Hour, Minute, and AM or PM
ampm.text = alarm.hour < 12 || alarm.hour == 24 ? "AM" : "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) time.text = String(format: "%i:%02i", hour, alarm.minute)
// displays the specific days alarm is activated // displays the specific days alarm is activated
+6 -2
View File
@@ -48,13 +48,17 @@ let wvms = [
] ]
struct Tone{ struct Tone: Codable{
let name: String let name: String
let tone: SystemSoundID 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 class Alarm: Codable, Equatable
{ {