TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✗ |
Maintained by Calvin Huang.
CHCountingLabel has not only function to do basic counting.
It also can speeding up or slowing down counting.
Use CHCountingLabel to bring more awesome effect for your app.
CHCountingLabel is very simple to use.
@IBOutlet weak var countingLabel: CountingLabel!
override func viewDidLoad() {
super.viewDidLoad()
countingLabel.textFormatter = { (value: Double) -> String in
return "\(Int(value))"
}
countingLabel.startValue = 50
// Default stop value is 0.
// coutingLabel.stopValue = 0
}
@IBAction func startCountingButtonClicked(_: AnyObject) {
countingLabel.start()
}
@IBAction func pauseCountingButtonClicked(_: AnyObject) {
countingLabel.pause()
}
@IBAction func stopCoutingButtonClicked(_: AnyObject) {
countingLabel.stop()
}
countingLabel.startValue = 0
countingLabel.stopValue = 50
countingLabel.easing = CubicBezier.Easing.EaseInOut
countingLabel.duration = 5
countingLabel.startValue = 50
// countingLabel.stopValue = 100
Accorading , you need to Update import statements in your Objective-C code (to #import "ProductModuleName-Swift.h")
.
#import "CHCountingLabel-Swift.h"
// or
@import "CHCountingLabel.h"
All done! Start to use CHCountingLabel!
Copyright © Calvin Huang. This software is licensed under the MIT License.