AMColorPicker
can select color by three ways.
Wheel | Table | Slider |
---|---|---|
Adopt the AMColorPickerDelegate protocol in the class declaration.
class ViewController: UIViewController, AMColorPickerDelegate
Conform to the protocol in the class implementation.
func colorPicker(_ colorPicker: AMColorPicker, didSelect color: UIColor) {
// use selected color here
}
Create and present the AMColorPicker as you see fit.
let colorPickerViewController = AMColorPickerViewController()
colorPickerViewController.selectedColor = .red
colorPickerViewController.delegate = self
present(colorPickerViewController, animated: true, completion: nil)
AMColorPicker
can be customized via the following properties.
public var selectedColor: UIColor = .white
public var isCloseButtonShown: Bool = true
public var isSelectedColorShown: Bool = true
Wheel | Table | Slider |
---|---|---|
Wheel | Table | Slider |
---|---|---|
Min height is 380.
Wheel | Table | Slider |
---|---|---|
Wheel | Table | Slider |
---|---|---|
Add this to your Podfile.
pod 'AMColorPicker'
Add this to your Cartfile.
github "adventam10/AMColorPicker"
MIT