Protocols

The following protocols are available globally.

  • A protocol defining callback methods for a ColorSlider preview view.

    To create a custom preview view, create a UIView subclass and implement ColorSliderPreviewing. Then, create an instance of your custom preview view and pass it to the ColorSlider initializer. As a user drags their finger, ColorSlider will automatically set your preview view’s center to the point closest to the touch, centered along the axis perpendicular to the ColorSlider‘s orientation.

    If autoresizesSubviews is true (the default value on all UIViews) on your ColorSlider, your preview view will also be automatically resized when its center point is being set. To disable resizing your preview, set the autoresizesSubviews property on your ColorSlider to false.

    See more

    Declaration

    Swift

    public protocol ColorSliderPreviewing