diff --git a/Example/Pastel/ViewController.swift b/Example/Pastel/ViewController.swift index 2df018b..949cc49 100644 --- a/Example/Pastel/ViewController.swift +++ b/Example/Pastel/ViewController.swift @@ -30,6 +30,7 @@ class ViewController: UIViewController { pastelView.animationDuration = 3.0 // Custom Color + pastelView.setColors([UIColor(red: 156/255, green: 39/255, blue: 176/255, alpha: 1.0), UIColor(red: 255/255, green: 64/255, blue: 129/255, alpha: 1.0), UIColor(red: 123/255, green: 31/255, blue: 162/255, alpha: 1.0), diff --git a/Pastel/Classes/PastelGradient.swift b/Pastel/Classes/PastelGradient.swift index 87bcafb..a26ea59 100644 --- a/Pastel/Classes/PastelGradient.swift +++ b/Pastel/Classes/PastelGradient.swift @@ -8,7 +8,7 @@ import UIKit -@objc enum PastelGradient: Int { +@objc public enum PastelGradient: Int { case warmFlame case nightFade case springWarmth diff --git a/Pastel/Classes/PastelView.swift b/Pastel/Classes/PastelView.swift index d6b9961..3656d9e 100644 --- a/Pastel/Classes/PastelView.swift +++ b/Pastel/Classes/PastelView.swift @@ -120,6 +120,10 @@ open class PastelView: UIView { self.colors = colors } + public func setPastelGradient(_ gradient: PastelGradient) { + setColors(gradient.colors()) + } + public func addcolor(_ color: UIColor) { self.colors.append(color) }