Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevebarnegren/sbgradientview
Convenient UIView wrapper for CAGradientLayer
https://github.com/stevebarnegren/sbgradientview
Last synced: 30 days ago
JSON representation
Convenient UIView wrapper for CAGradientLayer
- Host: GitHub
- URL: https://github.com/stevebarnegren/sbgradientview
- Owner: SteveBarnegren
- License: mit
- Created: 2016-10-25T14:43:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T11:05:57.000Z (almost 7 years ago)
- Last Synced: 2024-10-13T19:31:27.457Z (about 1 month ago)
- Language: Swift
- Size: 86.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SBGradientView
[![Version](https://img.shields.io/cocoapods/v/SBGradientView.svg?style=flat)](http://cocoapods.org/pods/SBGradientView)
[![License](https://img.shields.io/cocoapods/l/SBGradientView.svg?style=flat)](http://cocoapods.org/pods/SBGradientView)
[![Platform](https://img.shields.io/cocoapods/p/SBGradientView.svg?style=flat)](http://cocoapods.org/pods/SBGradientView)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](https://raw.githubusercontent.com/SteveBarnegren/SBGradientView/master/ScreenShots/Screenshot.png)
Four directions are supported:
```
public enum Direction {
case fromTop
case fromBottom
case fromLeft
case fromRight
}
```## Installation
**CocoaPods**
```ruby
pod "SBGradientView"
```**Manual**
Copy ```GradientView.swift``` in to your project
## Author
[@SteveBarnegren](https://twitter.com/stevebarnegren)
## License
SBGradientView is available under the MIT license. See the LICENSE file for more info.