Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An UILabel subclass that lets you animate text with different types

License

NotificationsYou must be signed in to change notification settings

Dywane/DWAnimatedLabel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An UILabel subclass that lets you animate text with different types, inspired byRQShineLabel.

wave

中文教程

Features

  • Subclass ofUILabel, easy to use
  • UseCADisplayLink to perform smooth animation
  • Four different animations
  • Pure Swift

typewriter

shine

fade

Installation

You want to addpod 'DWAnimatedLabel', '~> 1.1' or similar to the following to your Podfile:

target'MyApp'dopod'DWAnimatedLabel','~> 1.1'end

Then run apod 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.

letlabel=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 theanimationType property.

label.animationType=.wave

If you are usingwave animation, you also need to set theplaceHolderColor property, which isUIColor.lightGray by default.

label.placeHolderColor=.blue

After setting up these properties you can usestartAnimation(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 byDywanedu

About

An UILabel subclass that lets you animate text with different types

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp