DownCounter
public final class DownCounter
DownCounter provides a simple counting down function.
Version
1.7.0Date
03/05/2022-
Create a counter
Declaration
Swift
public init(queue: DispatchQueue = DispatchQueue.main)Parameters
queueThe queue that the timer should run on
-
Start counting
Declaration
Swift
public func start(count: Int, with interval: TimeInterval, tickerHandler: ((Int) -> Void)?, completionHandler: (() -> Void)?)Parameters
countNumber to count
intervalTime interval for each count
tickerHandlerCallback for each count
completionHandlerCallback when the counter finishes
-
Stop the counter
Declaration
Swift
public func stop()
DownCounter Class Reference