Latest 0.1.3
Homepage https://github.com/keepworks/KWGradientView
License MIT
Platforms ios 8.0
Authors

Screen Cast

Build Status
Version
License
Platform

Features

  • [x] Horizontal, vertical & diagonal gradients
  • [x] Animate gradients by changing colors

Requirements

  • iOS 8.0 or later
  • Swift 3.0

Installation

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

pod "KWGradientView"

How to use

Add the class KWGradientView to View on storyboard

Adding KWGradientView

Modifying color and gradient style using storyboard

Modify in storyboard

Or Modify Programmatically: Example with Horizontal Gradient

@IBOutlet weak var gradientView: KWGradientView!

gradientView.addGradientLayerAlongXAxis(colors: [UIColor.red, UIColor.green, UIColor.blue])

Also we can add any number of colors by adding them to the array of colors.

All the methods in the pod are implemented in GradientsViewController.swift for your reference.

Author

KeepWorks, [email protected]

Credits

KWGradientView is owned and maintained by KeepWorks.

N|Solid

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/keepworks/KWGradientView.

License

KWGradientView is available under the MIT License. See the License file for more info.

Latest podspec

{
    "name": "KWGradientView",
    "version": "0.1.3",
    "summary": "Subclass of UIView to add gradient to your views",
    "description": "Create horizontal, vertical & diagonal gradients on your view using this UIView subclass.",
    "homepage": "https://github.com/keepworks/KWGradientView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "KeepWorks": "[email protected]"
    },
    "source": {
        "git": "https://github.com/keepworks/KWGradientView.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "KWGradientView/Views/KWGradientView.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This