IMGLYColorPicker is a color picker control for iOS that has been extracted from the PhotoEditor SDK and made available as open source. It is written in Swift, compatible with Objective-C and has full support for wide colors. A user can select a color by hue, saturation, brightness and alpha.
To run the example project, clone the repo, and run
pod install from the Example directory first.
IMGLYColorPicker is written in Swift 3, so it requires Xcode 8. It is completely compatible with Objective-C and supports iOS 9 and above.
IMGLYColorPicker is available through CocoaPods. To install
it, simply add the following line to your Podfile:
ColorPickerView instance (or
IMGLYColorPickerView if using Objective-C) and add it to your view hierachy:
let colorPickerView = ColorPickerView() view.addSubview(colorPickerView)
Set the initially displayed color of the color picker:
colorPickerView.color = UIColor.red
Register yourself as a target to receive
.valueChanged events whenever the selected color changes:
colorPickerView.addTarget(self, action: #selector(colorPicked(_:)), for: .valueChanged)
9elements GmbH, [email protected]