ColorPickerViewController
@objc(HBColorPickerViewController)
open class ColorPickerViewController : UIViewController
Provides the Color Picker user interface.
Present this view controller to display the color picker. Do not push it onto a navigation
controller stack. In horizontally and vertically regular size class environments, for instance
on iPad and Mac, the picker will be presented as a popover. This means that you must set
sourceView or other similar properties on the view controller’s popoverPresentationController
before presentation.
To review examples of ColorPickerViewController in use, run pod try Alderis.
-
Initialise an instance of
ColorPickerViewControllerwith a configuration object.Remember to set the
delegatebefore presenting the view controller.Declaration
Swift
@objc public init(configuration: ColorPickerConfiguration) -
The delegate that will receive the user’s selection upon tapping the Done button, or a cancellation upon tapping the Cancel button.
Declaration
Swift
@objc open weak var delegate: ColorPickerDelegate? { get set } -
The configuration of the color picker. Use this to set the initially selected color, as well as other behavioral options.
Making changes to this value or its properties after the color picker interface has been presented may result in undefined behavior.
Declaration
Swift
@objc open var configuration: ColorPickerConfiguration! -
Deprecated. Set
ColorPickerConfiguration.overrideSmartInvertinstead.Declaration
Swift
@available(*, deprecated, message: "Use ColorPickerConfiguration instead") @objc open var overrideSmartInvert: Bool -
Deprecated. Set
ColorPickerConfiguration.colorinstead.Declaration
Swift
@available(*, deprecated, message: "Use ColorPickerConfiguration instead") @objc open var color: UIColor
View on GitHub
Install in Dash
ColorPickerViewController Class Reference