Latest 1.0.1
Homepage https://github.com/cfeenstra67/CFGradient
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Example of animating curveConstant on a CFGradientView:

image

CFGradientLayer Properties (All Animatable):

gradientType- either AxialGradient or RadialGradient. Exactly what it sounds like

startColor- CGColorRef used at the beginning of the gradient. If radial, this is at the center of the layer, and if axial it is at the startPoint of the layer

endColor- CGColorRef, opposite of startColor

startPoint- CGPoint that is used as the relative start point for the gradient if the gradient type is axial. Values for x and y should be between 0 and 1.

endPoint- CGPoint, opposite of startPoint

radius- CGFloat used as the relative radius if the gradient type is radial. Value should be between 0 and 1.

curveConstant- CGFloat used to define the gradient curve. Value should be between 0 and 1.

Requirements

iOS 8.0

Installation

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

pod "CFGradient"

Author

cfeenstra67, [email protected]

License

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

Latest podspec

{
    "name": "CFGradient",
    "version": "1.0.1",
    "summary": "The gradient package you've been waiting for.",
    "description": "This pod defines two classes: CFGradientView and CFGradientLayer.  They are effectively the same when used--CAGradientView simply uses CAGradientLayer as its base layer and uses its base layer's getter and setter methods for its custom properties.  These classes allow you to create beautiful, animatable gradients, either axial or radial!  Perhaps the best addition is the curveConstant property of CFGradientView and CFGradientLayer.  This allows you to define the exact distribution of colors between the startColor and endColor.",
    "homepage": "https://github.com/cfeenstra67/CFGradient",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "cfeenstra67": "[email protected]"
    },
    "source": {
        "git": "https://github.com/cfeenstra67/CFGradient.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "CFGradient/*.{h,m}"
}

Pin It on Pinterest

Share This