Latest 1.0.1
License MIT
Platforms ios 8.0

CI Status


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

Example of animating curveConstant on a CFGradientView:


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.


iOS 8.0


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

pod "CFGradient"


cfeenstra67, [email protected]


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": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "cfeenstra67": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "platforms": {
        "ios": "8.0"
    "source_files": "CFGradient/*.{h,m}"

Pin It on Pinterest

Share This