MaterialColorPicker 0.2.0

MaterialColorPicker 0.2.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2016
SPMSupports SPM

Maintained by George Kye.



MaterialColorPicker

codebeat badge

Demo Gif

Example

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

Usage

Delegate

func didSelectColorAtIndex(view: UIView, index: Int, color: UIColor)

Returns the index and color of the selected item.

 func sizeForCellAtIndex(MaterialColorPickerView: MaterialColorPicker, index: Int)->CGSize

Set size of cell at a spefic index

DataSource

func colors()->[UIColor]

Set colors for MaterialColorPicker (Default colors will be used if no dataSource set) google-material-color-swift by katopz included in project

Properties

public var shuffleColors: Bool = false //Shuffles colors within ColorPicker
public func selectCellAtIndex(index: Int)

Programtically select a cell at an index

Installation

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

pod "MaterialColorPicker"

Author

George Kye

License

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

Change Log

0.1.5

  • Added itemSize public property to allow configuration of color picker cell.

0.1.6

  • Added selectCellAtIndex function and sizeForCellAtIndex delegate