Dywane/DWAnimatedLabel
关于
An UILabel subclass that lets you animate text with different types
网站与应用开发可以做什么
- Subclass of UILabel, easy to use
- Use CADisplayLink to perform smooth animation
- Four different animations
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文DWAnimatedLabel
An UILabel subclass that lets you animate text with different types, inspired by RQShineLabel.

Features
- Subclass of
UILabel, easy to use - Use
CADisplayLinkto perform smooth animation - Four different animations
- Pure Swift



Installation
You want to add pod 'DWAnimatedLabel', '~> 1.1' or similar to the following to your Podfile:
target 'MyApp' do
pod 'DWAnimatedLabel', '~> 1.1'
end
Then run a pod install inside your terminal, or from CocoaPods.app.
Alternatively to give it a test run, run the command:
pod try DWAnimatedLabel
Usage
First, import the module:
import DWAnimatedLabel
Then you can create the label just like using UILabel.
let label = DWAnimatedLabel(frame: CGRect(x: 20, y: 44, width: UIScreen.main.bounds.size.width, height: 100))
label.text = "LOADING"
label.font = UIFont.systemFont(ofSize: 70, weight: .bold)
Also you can choose animation type by setting the animationType property.
label.animationType = .wave
If you are using wave animation, you also need to set the placeHolderColor property, which is UIColor.lightGray by default.
label.placeHolderColor = .blue
After setting up these properties you can use startAnimation(duration: TimeInterval, _ completion:(() -> Void)?) to start performing the animation.
Requirements
- iOS 9.0 +
- Swift 4
- Xcode 9
Contribution
You are welcome to fork and submit pull requests or issues.
License
DWAnimatedLabel is open-source software licensed under the MIT license.
Credits
DWAnimatedLabel is owned and maintained by Dywanedu
探索相关项目
加载中…