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: 14 days 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 (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-02-20T06:40:21.000Z (about 5 years ago)
- Last Synced: 2025-04-10T02:57:36.253Z (17 days ago)
- Topics: carthage, cocoapods, gradient, radial-gradients, swift, travis, ui, uikit
- Language: Swift
- Homepage:
- Size: 45.9 KB
- Stars: 10
- Watchers: 1
- 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.
[](/releases)
[](/LICENSE)[](https://travis-ci.org/kgn/KGNGradientView)
[]()
[](https://github.com/Carthage/Carthage)
[](https://cocoapods.org/pods/KGNGradientView)
[](https://cocoapods.org/pods/KGNGradientView)[](http://twitter.com/iamkgn)
[](https://github.com/kgn)
[](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