ColorPickerViewController

@available(iOS 9.0, *)
open class ColorPickerViewController<SpriteModelType, GestureController, SelectionView> : ViewController, ProxyZoomControllerDelegate, ColorPipetteViewDelegate where SpriteModelType : SpriteModel, GestureController : SpriteGestureController<SpriteModelType, SelectionView>, SelectionView : UIView
extension ColorPickerViewController: SpriteEditControllerDelegate

A ColorPickerViewController can present a ColorPickerView and a ColorPipetteView in its view. Additionally it can contain a SpriteEditController below the color picker view.

Properties

Initializers

Showing/Hiding Color Pipette View

  • Returns true if the color pipette view is visible.

    Declaration

    Swift

    open private(set) var isColorPipetteVisible: Bool { get }
  • Shows or hides the color pipette.

    Declaration

    Swift

    open func toggleColorPipette(at normalizedPosition: CGPoint? = nil)

    Parameters

    normalizedPosition

    The starting position in the untransformed image where the color pipette will be shown. If this value is nil the pipette will be shown in the center of this ColorPickerViewController.

  • Shows the color pipette.

    Declaration

    Swift

    open func showColorPipette(at normalizedPosition: CGPoint? = nil)

    Parameters

    normalizedPosition

    The starting position in the untransformed image where the color pipette will be shown. If this value is nil the pipette will be shown in the center of this ColorPickerViewController.

  • Hides the color pipette.

    Declaration

    Swift

    open func hideColorPipette()

Showing/Hiding Color Picker View

  • Returns true if the color picker view is visible.

    Declaration

    Swift

    open private(set) var isColorPickerVisible: Bool { get }
  • Shows or hides the color picker.

    Declaration

    Swift

    open func toggleColorPicker()
  • Shows the color picker.

    Declaration

    Swift

    open func showColorPicker()
  • Hides the color picker.

    Declaration

    Swift

    open func hideColorPicker()