How to get time from UICircularTimerRing?
m-tatsuto opened this issue · comments
Can't get progress time.
I am calling continueTimer()
by force, but Debug logs are noisy
self.progressUpdateTimer = Timer.scheduledTimer(withTimeInterval: 0.2, repeats: true, block: { (timer) in
self.searchProgress.continueTimer()
})
searchProgress.startTimer(to: maxtime) { (state) in
switch state {
case .finished:
self.searchProgress.resetTimer()
self.progressTimer()
case .continued(let time):
let remainTime = Int(maxtime) - Int(time ?? 0)
self.searchProgressInfoLabel.text = "\(remainTime)s"
default:
break
}
}
Not sure what you are asking here, in the continued
state time
is the current time of the ring.
You should also only call continueTimer
after pauseTimer
, if you want to reset the timer call resetTimer
I want to get the remaining time while the ring is spinning.
I can't find way