Latest 0.0.2
License MIT
Platforms ios 8.0, tvos 9.0, requires ARC


Carthage compatible

GradientView is a simple UIView subclass uses a CAGradientLayer as its root layer class. It then exposes all of the properties of the gradient layer and swiftifies them for type safety and convenience.


  • iOS 8.0+
  • tvOS 9.0+
  • Xcode 7+

Installation using CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

Because GradientView is written in Swift, you must use frameworks.

To integrate GradientView into your Xcode project using CocoaPods, specify it in your Podfile:

source ''
platform :ios, '8.0'

pod 'GradientLayerView'

Then, run the following command:

$ pod install

Installation using Carthage

Add this to your Cartfile:

github "nuudles/GradientView"


Simply add an GradientView into your view hierarchy. You can then configure it like you would a CAGradientLayer as described in Apple’s documentation.

let gradientView = GradientView()
gradientView.colors = [.whiteColor(), .blackColor()]

Latest podspec

    "name": "GradientLayerView",
    "version": "0.0.2",
    "license": "MIT",
    "summary": "The GradientView is a simple UIView with a CAGradientLayer, forwarding its properties up",
    "homepage": "",
    "authors": {
        "Christopher Luu": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.2"
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    "source_files": "GradientView/*.swift",
    "requires_arc": true

Pin It on Pinterest

Share This