luowei / LWColorPicker

LWColorPicker,颜色选择器,支持色相、饱和度、透明度的选取,支持圆形和矩形HSB颜色模式图。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LWColorPicker

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

@property (nonatomic) IBOutlet RSColorPickerView *colorPicker;

- (void)awakeFromNib {
    [super awakeFromNib];

    if(_colorPicker && _brightnessSlider && _opacitySlider){
        _colorPicker.delegate = self;
        _brightnessSlider.delegate = self;
        _opacitySlider.delegate = self;
    }
}

// Implement RSColorPickerViewDelegate
- (void)colorPickerDidChangeSelection:(RSColorPickerView *)colorPicker {

    UIColor *selectedColor = [colorPicker selectionColor];
    //todo: something ......
}


// Implement RSBrightnessSliderDelegate
- (void)brightnessSlide:(RSBrightnessSlider *)brightnessSlider valueChanged:(float)value {
    [_colorPicker setBrightness:value];
}

// Implement RSOpacitySliderDelegate
- (void)opacitySlider:(RSOpacitySlider *)opacitySlider opacityChanged:(float)value {
    [_colorPicker setOpacity:value];
}

Requirements

Installation

LWColorPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'LWColorPicker'

Carthage

github "luowei/LWColorPicker"

Author

luowei, luowei@wodedata.com

License

LWColorPicker is available under the MIT license. See the LICENSE file for more info.

About

LWColorPicker,颜色选择器,支持色相、饱和度、透明度的选取,支持圆形和矩形HSB颜色模式图。

License:MIT License


Languages

Language:Objective-C 97.1%Language:Ruby 1.6%Language:Shell 1.3%