/ Color

A simple color picker for iOS

A simple color picker for iOS

ColorPicker

This is the simple color picker for iOS.

ColorPicker

Usage

class ViewController: UIViewController, ColorPickerViewDelegate {

    @IBOutlet weak var colorPicker: ColorPickerView!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Set delegate of color picker
        colorPicker.delegate = self
    }

    func colorPickerDidSelectColor(_ colorPicker: ColorPickerView) {
      // Can get the selected color from the color picker
      let color = colorPicker.selectedColor
    }
}

Example

To run the example project, open the Example/Example.xcworkspace.

Installation

CocoaPods

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

pod 'CULColorPicker'

Carthage

Add the following line to your Cartfile:

github "culumn/ColorPicker"

Requirements

  • iOS 9.0+
  • Xcode 10.0
  • Swift 4.2

GitHub