RainbowColorPicker 0.1.2

RainbowColorPicker 0.1.2

维护者:Jinfeng_Li.



  • 作者:
  • Jinfeng Li

RainbowColorPicker

Version License Platform

RainbowColorPicker 是一款针对iOS开发者的轻量级颜色选择器。

要求

  • iOS 12.x~
  • Swift 5.0

使用方法

Podfile

platform :ios, '12.0'
pod "RainbowColorPicker", "~> 0.1.1"

安装

$ pod install

使用方法

初始化
// you can also use autolayout from storyboard
let colorPicker = RainbowColorPickerView(frame: CGRect(x: 0, y: 0, width: 400, height: 400))
colorPicker.backgroundColor = UIColor.clear
colorPicker.delegate = self
colorPicker.center = self.view.center
self.view.addSubview(colorPicker)
Adpot 协议
extension ViewController: RainbowColorPickerViewProtocol {
    func colorDidReceive(_ color: UIColor) {
        // this is the color that user picked
        print("color:", color)
    }
}

作者

Jinfeng(Jackie) Li, [email protected]

许可证

RainbowColorPicker 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。