CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Jul 2017 |
| SwiftSwift Version | 3.0 |
| SPMSupports SPM | ✗ |
Maintained by Cem Olcay.
A color palette grid view for iOS.
pod 'ColorPalette'Create a ColorPaletteView either from storyboard or programmatically.
Set rowCount and columnCount to setup palette grid. (Defaults 2x10).
Implement delegate and dataSource.
Use this data source method to fill palette with colors.
func colorPalette(_ colorPalette: ColorPaletteView, colorAt index: Int) -> UIColor?
Use this delegate method to inform about color selection changes.
func colorPalette(_ colorPalette: ColorPaletteView, didSelect color: UIColor, at index: Int)
You can also observe colorPalette.selectedColor dynamic property to create bindings.
This is a basic struct with border, corner radius, and background color properties of palette items with their selected or unselected states.
You can use either colorPalette.paletteItemDisplayOptions property to set each property or use the @IBInspectable bridge properties from storyboard.