SRCountdownTimer icon indicating copy to clipboard operation
SRCountdownTimer copied to clipboard

timerDidEnd Function not working

Open junaidxabd opened this issue 3 years ago • 1 comments

I added the timerDidEnd function to my Viewcontroller but it doesn't seem run.

    func timerDidEnd(sender: SRCountdownTimer, elapsedTime: TimeInterval) {
        print("ended")
    }
  

junaidxabd avatar Mar 01 '21 12:03 junaidxabd

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... } }

AdrienRoux avatar Mar 12 '21 14:03 AdrienRoux