[![CI Status](http://img.shields.io/travis/Nicholas Hart/HSVColorPicker.svg?style=flat)](https://travis-ci.org/Nicholas Hart/HSVColorPicker)
To run the example project, clone the repo, and run pod install
from the Example directory first.
HSVColorPicker uses UIKit and OpenGL.
HSVColorPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "HSVColorPicker"
Currently you must use initWithFrame:
to initialize HSVColorPicker. If you use it in a Storyboard with auto layout it will not work, because initWithFrame:
is not called. eg:
- (void)viewDidLoad {
[super viewDidLoad];
// add the color picker and set ourselves as the delegate
HSVColorPicker * colorPicker = [[HSVColorPicker alloc] initWithFrame:self.view.frame];
colorPicker.delegate = self;
[self.view addSubview:colorPicker];
}
Be sure to implement the HSVColorPickerDelegate
in your view controller so you can respond to changes. eg:
- (void)colorPicker:(HSVColorPicker *)colorPicker changedColor:(UIColor *)color {
// update your UI with color
}
Below is a screen shot of the example app, which shows what the HSVColorPicker control looks like.
- implement autolayout support
- implement support for UIControlEventValueChanged
- implement unit tests
Alex Klein, [email protected]
Nicholas Hart, [email protected]
HSVColorPicker is available under the MIT license. See the LICENSE file for more info.