BradColorPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "BradColorPicker"
##Usage
Present the BradColorPicker view controller and set it's delegate. The initial color can also be set:
let picker:BradColorPicker = BradColorPicker(delegate: self); // init with white
//let picker:BradColorPicker = BradColorPicker(delegate: self, r:0.5, g:0, b:0.5, a:1);
//let picker:BradColorPicker = BradColorPicker(delegate: self, color: UIColor.greenColor());
self.presentViewController(picker, animated: true, completion: {});
Implement the delegate, BradColorPickerDelegate:
// MARK: BradColorPickerDelegate
func bradColorPicked(color: UIColor) {
// use color
}
To run the example project, clone the repo, and run pod install
from the Example directory first.
Brad Kratky, [email protected]
BradColorPicker is available under the MIT license. See the LICENSE file for more info.