ColorCollectionView
@available(iOS 9.0, *)
@objcMembers
@objc(PESDKColorCollectionView)
open class ColorCollectionView : UIView
extension ColorCollectionView: UICollectionViewDelegate, UICollectionViewDelegateFlowLayout
extension ColorCollectionView: UICollectionViewDataSource
A view that displays a ColorPalette
within a collection view.
-
The color palette to display.
Declaration
Swift
open var colorPalette: ColorPalette
-
The object that acts as the delegate.
Declaration
Swift
open weak var delegate: ColorCollectionViewDelegate?
-
The currently selected color.
Declaration
Swift
open var selectedColor: Color? { get }
-
Creates a new
ColorCollectionView
for the given color palette.Declaration
Swift
public init(colorPalette: ColorPalette)
Parameters
colorPalette
The color palette to display.
-
Selects the color at the given index.
Declaration
Swift
open func selectColor(atIndex index: Int, animated: Bool)
Parameters
index
The index of the color to select.
animated
Whether to animated the change.