TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✗ |
Maintained by Dewanshu.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Swift 2.2
CLTimer provides you a circular timer to integrate in your ios app with multiple designs and time format options. Intead of writing complicated code with complex calculations you can simply integrate Timer in your app with a single line of code.
CLTimer is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "CLTimer"
Step 1 - From identity inspector replace UIView class of your UIView with CLTimer class in your xib or StoryBoard.
Step 2 - Create its Outlet.
@IBOutlet weak var timer: CLTimer!
To start Timer
timer.startTimer(withSeconds: 100, format:.Minutes , mode: .Reverse)
Change countDown circle and Timer circle color by selecting CLTimer View from your StoryBoard or xib.
To Reset Timer
timer.resetTimer()
To Stop Timer
timer.stopTimer()
To Hide Default CountDown
timer.showDefaultCountDown=false
To Show CountDown time on your Own Label
class ViewController: UIViewController,cltimerDelegate
func timerDidUpdate(time:Int){
print("updated Time : ",time)
myLabel.text = "\(time) Seconds"
}
You can also checkout some other CLTimer Delegate functions
https://www.youtube.com/channel/UCwYjZ3vXQYhJaRwUm6u9-bA
Dewanshu Sharma, [email protected]
CLTimer is available under the MIT license. See the LICENSE file for more info.