Latest 0.0.2
Homepage https://github.com/nuudles/GradientView
License MIT
Platforms ios 8.0, tvos 9.0, requires ARC
Authors

GradientView

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.

Requirements

  • 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 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'GradientLayerView'

Then, run the following command:

$ pod install

Installation using Carthage

Add this to your Cartfile:

github "nuudles/GradientView"

Usage

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()]
view.addSubview(gradientView)

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": "https://github.com/nuudles/GradientView",
    "authors": {
        "Christopher Luu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nuudles/GradientView.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