CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

BradColorPicker 0.5.0

BradColorPicker 0.5.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2020
SPMSupports SPM

Maintained by Brad Kratky.




BradColorPicker

Version License Platform

Screenshots

Installation

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

pod "BradColorPicker"

##Usage

Swift 2: v0.1.0 Swift 3: v0.2.0

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
}

Example

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

Author

Brad Kratky, [email protected]

License

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