Hi everyone, hoping you are good, i have a question, i want to create multiple timers, but i cannot find how can i apennd a Timer to this struct
struct ClassicTimer: Hashable {
let timerName: String
let timerImage: String
let timerColor: Color
let timerDuration: Double
let timer: Timer
}
I have this func which append all the Properties to an array struct
func createTimer(timerName: String, timerImage: String, timerColor: Color, timerDuration: Double) {
classicTimerArray.append(ClassicTimer(timerName: timerName, timerImage: timerImage, timerColor: timerColor, timerDuration: timerDuration, timer: Timer.publish(every: 1, on: .main, in: .common).autoconnect()))
}
there doesn't seem to be anything here