zakkhoyt / ColorPicKit

A collection of UIControls for picking colors on iPhone, iPad, and other iOS devices. Gradient slider, Hue slider, RGB sliders, HSB sliders, CMYK sliders, ImagePixelPicker, HSB Wheel, HSB Spectrum. Color related class extensions
MIT License
16 stars 4 forks source link

Expose color property as IBInspectable for SliderGroups #5

Closed zakkhoyt closed 8 years ago

zakkhoyt commented 8 years ago

With slider groups (RGB, HSB, CMYK) the user should be able to set the color with IB. Add a set computed property to color and expose it as IBInspectable

zakkhoyt commented 8 years ago

I began work on this by adding @IBInspectable. It seems to work great for some colors but for others it either:

Not sure why at the moment, but it could be calculating values outside the valid range. Perhaps not all colors can be represented by the slider groups?

zakkhoyt commented 8 years ago

Done. The controls weren't aware of wide colors. If you set a color in IB, it maybe be wide color meaning it will have RGB values < 0 or > 1. Added code to clip when setting. Will add wide color slider group soon