Need help adding two UIPickers to one view
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user