Degree 1.1

Degree 1.1

Maintained by Igor Matyushkin.




Degree 1.1

Degree

At a Glance

Degree is a tool for making gradient in Swift.

How To Get Started

  • Copy content of Source folder to your project.

or

  • Use Degree cocoapod

Requirements

  • iOS 9 and later
  • Xcode 9 and later
  • Swift 4

Usage

Example of usage:

let gradientView = GradientView()
gradientView.gradient = Gradient.make
    .from(
        x: .left,
        y: .top
    )
    .to(
        x: .right,
        y: .bottom
    )
    .step(withColor: .white, andLocation: 0.0)
    .step(withColor: .orange, andLocation: 0.5)
    .step(withColor: .purple, andLocation: 1.0)
    .get

Each step is defined by its color and location, which is a Float value from 0.0 to 1.0.

License

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