Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kgn/kgngradientview
KGNGradientView is a collection UIView subclasses for linear and radial gradients.
https://github.com/kgn/kgngradientview
carthage cocoapods gradient radial-gradients swift travis ui uikit
Last synced: 3 months ago
JSON representation
KGNGradientView is a collection UIView subclasses for linear and radial gradients.
- Host: GitHub
- URL: https://github.com/kgn/kgngradientview
- Owner: kgn
- License: mit
- Created: 2014-06-26T07:14:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-02-20T06:40:21.000Z (almost 5 years ago)
- Last Synced: 2024-09-15T11:21:11.706Z (4 months ago)
- Topics: carthage, cocoapods, gradient, radial-gradients, swift, travis, ui, uikit
- Language: Swift
- Homepage:
- Size: 45.9 KB
- Stars: 10
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KGNGradientView
`KGNGradientView` is a collection `UIView` subclasses for linear and radial gradients.
[![Release](https://img.shields.io/github/release/kgn/KGNGradientView.svg)](/releases)
[![License](http://img.shields.io/badge/License-MIT-lightgrey.svg)](/LICENSE)[![Build Status](https://travis-ci.org/kgn/KGNGradientView.svg)](https://travis-ci.org/kgn/KGNGradientView)
[![Test Coverage](http://img.shields.io/badge/Tests-58%25-red.svg)]()
[![Carthage Compatible](https://img.shields.io/badge/Carthage-Compatible-4BC51D.svg)](https://github.com/Carthage/Carthage)
[![CocoaPods Version](https://img.shields.io/cocoapods/v/KGNGradientView.svg)](https://cocoapods.org/pods/KGNGradientView)
[![CocoaPods Platforms](https://img.shields.io/cocoapods/p/KGNGradientView.svg)](https://cocoapods.org/pods/KGNGradientView)[![Twitter](https://img.shields.io/badge/[email protected])](http://twitter.com/iamkgn)
[![Follow](https://img.shields.io/github/followers/kgn.svg?style=social&label=Follow%20%40kgn)](https://github.com/kgn)
[![Star](https://img.shields.io/github/stars/kgn/KGNGradientView.svg?style=social&label=Star)](https://github.com/kgn/KGNGradientView)## Installing
### Carthage
```
github "kgn/KGNGradientView"
```### CocoaPods
```
pod 'KGNGradientView'
```## Examples
### Gradient
`Gradient` is a struct that encapsulates the start and end colors of the gradient.### VerticalGradientView
A `UIView` subclass that creates a view with a linear gradient.
``` Swift
let view = VerticalGradientView()
view.gradient = Gradient(startColor: UIColor.redColor(), endColor: UIColor.blueColor())
```### RadialGradientView
A `UIView` subclass that creates a view with a radial gradient.
``` Swift
let view = RadialGradientView()
view.gradient = Gradient(startColor: UIColor.redColor(), endColor: UIColor.blueColor())
```## Progress
- [X] Tests
- [X] Travis
- [X] Badges
- [X] Carthage
- [X] CocoaPods
- [X] Description
- [X] Documentation
- [ ] AppleTV
- [X] Prebuilt Frameworks
- [ ] Travis Test Matrix