To run the example project, clone the repo, and run pod install
from the Example directory first.
CHAnimationLabel is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'CHAnimationLabel'
let label = CHAnimationLabel(frame: CGRect(x: 33, y: 66, width: 333, height: 133))
label.animationType = .typewriter
///label.animationType = .shine
///label.animationType = .count
label.text = "This is a label with animation effects"
label.textColor = .black
view.addSubview(label)
label.startAnimation(duration: 2, nil)
let label = CHAnimationLabel(frame: CGRect(x: 33, y: 66, width: 333, height: 133))
label.animationType = .easeInOut
///label.animationType = .easeIn
///...
label.text = "This is a label with animation effects"
label.textColor = .black
view.addSubview(label)
label.startCounterAnimation(frome: 0, to: 10000, with: 2) {
debugPrint("do something")
}
杨胜浩, chuqingr@icloud.com
CHAnimationLabel is available under the MIT license. See the LICENSE file for more info.