Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.04 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.04 KB

KPRColorPicker

KPRColorPicker is an easy to use color picker controller for iOS. RGB and hex value will be presented and update in real time.

alt tag

Features

  • Simple and easy to use
  • Pre-selected color update in real time
  • Return UIColor through delegate

Installation

Drag folder "KPRColorPicker" to your project directory and done!

Usage

To instantiate KPRColorPicker class and present the controller

let picker = KPRColorPicker.init()
picker.delegate = self
self.present(picker, animated: true, completion: nil)

To registered delegation listener

func KPRColorPickerDidSelectWithUIColor(sender: UIColor){
self.view.backgroundColor = sender
}

Delegate

Use the delegate callbacks to receive selected color as UIColor

func KPRColorPickerDidSelectWithUIColor(sender: UIColor)

@ratanakKy

Twitter: @ratanakKy