mirror of
https://github.com/joncardasis/ChromaColorPicker.git
synced 2024-11-29 11:15:55 +03:00
1.2 KiB
1.2 KiB
JCColorPicker
An iOS color picker built in Swift
Installation
Cocoapods
pod 'JCColorPicker'
Manually
Add all files from the JCColorPicker folder to your project.
Examples
let neatColorPicker = JCColorPicker(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
Customization
``` colorPicker.delegate = self colorPicker.padding = 10 colorPicker.stroke = 3 //stroke of the rainbow circle colorPicker.currentAngle = Float(M_PI) colorPicker.hexLabel.textColor = UIColor.whiteColor() ```Supported UIControlEvents
.TouchDown
-> called when the handle is first grabbed
.TouchUpInside
-> called when handle is let go
.ValueChanged
-> called whenever the color has changed hue or shade
.TouchDragInside
-> called when the handle has moved by a drag action
License
JCColorPicker is available under the MIT license. See the LICENSE file for more info.