AMColorPicker 3.0.1

AMColorPicker 3.0.1

am10 维护。



  • am10

AMColorPicker

Pod Platform Pod License Pod Version Carthage Compatible

AMColorPicker 可以通过以下三种方式选择颜色。

演示

colorpicker

轮盘 表格 滑动条
wheel table slider

使用

在类声明中采用 AMColorPickerDelegate 协议。

class ViewController: UIViewController, AMColorPickerDelegate

在类实现中遵守该协议。

func colorPicker(_ colorPicker: AMColorPicker, didSelect color: UIColor) {    
    // use selected color here
}

根据需要创建并显示 AMColorPicker。

let colorPickerViewController = AMColorPickerViewController()
colorPickerViewController.selectedColor = .red
colorPickerViewController.delegate = self
present(colorPickerViewController, animated: true, completion: nil)

自定义

AMColorPicker 可以通过以下属性进行自定义。

public var selectedColor: UIColor = .white
public var isCloseButtonShown: Bool = true
public var isSelectedColorShown: Bool = true

模态

轮盘 表格 滑动条
modal_w modal_t modal_s

推送

轮盘 表格 滑动条
push_w push_t push_s

弹出窗口

最小高度为380。

轮盘 表格 滑动条
pop_w pop_t pop_s

暗黑模式

轮盘 表格 滑动条
dark_w dark_t dark_s

安装

CocoaPods

将以下内容添加到您的Podfile中。

pod 'AMColorPicker'

Carthage

将以下内容添加到您的Cartfile。

github "adventam10/AMColorPicker"

许可协议

MIT