SRCountdownTimer
SRCountdownTimer copied to clipboard
timerDidEnd Function not working
I added the timerDidEnd function to my Viewcontroller but it doesn't seem run.
func timerDidEnd(sender: SRCountdownTimer, elapsedTime: TimeInterval) {
print("ended")
}
For this function to run, you need to :
- set the Delegate to self in the view in viewDidLoad()
- add this function in an extension of SRCountdownTimerDelegate in your ViewController
example :
extension CircularTimerRingViewController: SRCountdownTimerDelegate { func timerDidEnd(sender: SRCountdownTimer, elapsedTime: TimeInterval) { // your code... } }