GradientX
需求
iOS 8.0+
安装
Gradient 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
pod 'GradientX'
使用
//MARK: - Label
let label = GradientLabel()
///更改颜色
label.new(colors: [UIColor.red.cgColor, UIColor.black.cgColor, UIColor.white.cgColor])
/// 更改方向
label.new(direction: .vertical)
//MARK: - Button
let button = GradientButton()
///更改颜色
button.new(colors: [UIColor.red.cgColor, UIColor.black.cgColor, UIColor.white.cgColor])
/// 更改方向
button.new(direction: .vertical)