Latest 0.1.0
Homepage https://github.com/pikachu987/TextGradation
License MIT
Platforms ios 8.0
Authors

Version
License
Platform
Swift 4.2

Introduce

You can add a gradient to the text of a UILabel or UIButton.

Requirements

TextGradation written in Swift 4.2. Compatible with iOS 8.0+

Installation

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

pod 'TextGradation'

Xib or Storyboard file

GradationLabel

image

image

GradationButton

image

image

Code Editor

import TextGradation

gradationLabel.gradation(
    .horizontal, 
    colors: [UIColor.gray, UIColor.red, UIColor.blue, UIColor.black]
)

gradationButton.gradation(
    .horizontal, 
    colors: [UIColor.gray, UIColor.red, UIColor.blue, UIColor.black]
)

progress


gradationProgressHorizontalLabel.gradation(
    .horizontal, 
    startColor: UIColor(red: 106/255, green: 183/255, blue: 216/255, alpha: 1), 
    endColor: .black, 
    progress: CGFloat(sender.value)
)

gradationProgressVerticalLabel.gradation(
    .vertical, 
    startColor: UIColor(red: 106/255, green: 183/255, blue: 216/255, alpha: 1), 
    endColor: .black, 
    progress: CGFloat(sender.value)
)

gradationProgressHorizontalButton.gradation(
    .horizontal, 
    startColor: UIColor(red: 106/255, green: 183/255, blue: 216/255, alpha: 1), 
    endColor: .black, 
    progress: CGFloat(sender.value)
)

gradationProgressVerticalButton.gradation(
    .vertical, 
    startColor: UIColor(red: 106/255, green: 183/255, blue: 216/255, alpha: 1), 
    endColor: .black, 
    progress: CGFloat(sender.value)
)

Author

pikachu987, [email protected]

License

TextGradation is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "TextGradation",
    "version": "0.1.0",
    "summary": "Gradation of UILabel or UIButton",
    "description": "You can add a gradient to the text of a UILabel or UIButton.nIt can be added with a simple extension gradation method.",
    "homepage": "https://github.com/pikachu987/TextGradation",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "pikachu987": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pikachu987/TextGradation.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "TextGradation/Classes/**/*",
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This