An UILabel subclass that lets you animate text with different types
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
An UILabel subclass that lets you animate text with different types, inspired by RQShineLabel.
UILabel, easy to use
CADisplayLinkto perform smooth animation
You want to add
pod 'DWAnimatedLabel', '~> 1.1'similar to the following to your Podfile:
target 'MyApp' do pod 'DWAnimatedLabel', '~> 1.1' end
Then run a
pod installinside your terminal, or from CocoaPods.app.
Alternatively to give it a test run, run the command:
pod try DWAnimatedLabel
You need to import the module fire:
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
label.animationType = .wave
If you are using
waveanimation, you also need to set the
placeHolderColorproperty, otherwise it will be
label.placeHolderColor = .blue
After setting up these properties you can use
startAnimation(duration: TimeInterval, _ completion:(() -> Void)?)to start perform animation.
You are welcome to fork and submit pull requests or issues.
DWAnimatedLabel is open-sourced software lincened under the MIT license.
DWAnimatedLabel is owned and maintained by Dywanedu