Latest 0.0.1
Homepage https://github.com/Andrewmika/ASGradientLabel
License MIT
Platforms ios 7.0
Authors

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

示例:

ASGradientLabel

Latest podspec

{
    "name": "ASGradientLabel",
    "version": "0.0.1",
    "summary": "u6587u5b57u6e10u53d8Label",
    "description": "u6587u5b57u6e10u53d8u7684labeluff0cu652fu6301textu548cattributeText",
    "homepage": "https://github.com/Andrewmika/ASGradientLabel",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Andrew Shen": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/Andrewmika/ASGradientLabel.git",
        "tag": "0.0.1"
    },
    "source_files": "ASGradientLabel/**/*.{h,m}"
}

Pin It on Pinterest

Share This