Skip to content

Navigation Menu

Sign in
Appearance settings

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
Appearance settings

Andrewmika/ASGradientLabel

Repository files navigation

ASGradientLabel

Version License Platform

Installation

ASGradientLabel is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ASGradientLabel'

文字渐变Label

由于项目原因需要使用文字渐变,虽然可以使用CAGradientLayer来实现,但是由于项目为自动布局使用起来会比较麻烦,因此采取重写drawRect的方法。

参考自网上的方法,做了一点封装。

功能:

  • 支持自动布局。
  • CAGradientLayer设置渐变
  • 支持设置AttributedString

示例:

About

文字渐变 gradient color Label

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /