Skip to content

A simple but flexible gradient view with Interface Builder support

License

Notifications You must be signed in to change notification settings

lurado/LDOGradientView

Repository files navigation

LDOGradientView

Version License Platform

LDOGradientView demo

Usage

let gradientView = LDOGradientView()
gradientView.rotation = CGFloat(45)
gradientView.startColor = .red
gradientView.endColor = .yellow
gradientView.startOffset = 0.2
gradientView.endOffset = 0.5

While easy to use from code, you'll probably want to configure it in Interface Builder.

LDOGradientView demo

While LDOGradientView uses IBInspectable it does not support IB_DESIGNABLE, because it seems that Interface Builder still struggles rendering those views properly.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

LDOGradientView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'LDOGradientView'

Author

Raschke & Ludwig GbR, https://www.lurado.com/

License

LDOGradientView is available under the MIT license. See the LICENSE file for more information.

About

A simple but flexible gradient view with Interface Builder support

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published