Open PedroAnibarro1 opened 8 years ago
Workaround
func countingAt(timeCounted timeCounted: NSTimeInterval, timeRemaining: NSTimeInterval){
switch timeRemaining {
case -1.0:
updateCountdown()
default:
print("Time Remaining: \(timeRemaining)")
}
}
hi. timer has already invalidated when countdown finished.
use countingAt
is the better workaround your wrote above.
Maybe its just me but the delegate does not work for me. none this code executes
func countingAt(timeCounted timeCounted: NSTimeInterval, timeRemaining: NSTimeInterval) {
switch timeRemaining {
case 10:
print("10 seconds remaining")
case -1.0:
print("timer invalidated")
default:
print("Time Remaining: \(timeRemaining)")
}
}
@PedroAnibarro1 Thanks for the solution mine works with case 1: instead for -1
Hi,
I'm trying to reset my countdown once it hit 0.
I have a call of function in the delegate countdownFinished() to set the countdown and start again.
The problem is that the label text is set up but it do not start.
Any idea?