SteveBarnegren / SBGradientView

Convenient UIView wrapper for CAGradientLayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SBGradientView

Version License Platform

Convenient UIView wrapper around CAGradientLayer

How to use

let colors = [UIColor.red, UIColor.orange, UIColor.green, UIColor.blue]
let gradientView = GradientView(direction: .fromTop, colors: colors)

IMG

Four directions are supported:

public enum Direction {
        case fromTop
        case fromBottom
        case fromLeft
        case fromRight
    }

Installation

CocoaPods

pod "SBGradientView"

Manual

Copy GradientView.swift in to your project

Author

@SteveBarnegren

License

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

About

Convenient UIView wrapper for CAGradientLayer

License:MIT License


Languages

Language:Swift 77.9%Language:Ruby 15.1%Language:Objective-C 7.0%