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.
-
The object that acts as a delegate.
Declaration
Swift
open weak var delegate: ColorPickerViewControllerDelegate?
-
The color pipette view.
Declaration
Swift
open private(set) lazy var colorPipetteView: ColorPipetteView { get set }
-
The color picker view.
Declaration
Swift
open private(set) lazy var colorPickerView: ColorPickerView { get set }
-
The container view that hosts the color picker.
Declaration
Swift
open private(set) lazy var containerView: MenuAccessoryContainerView { get set }
-
The sprite view that is currently modified by this color picker view controller.
Declaration
Swift
open var spriteView: SpriteView? { get set }
-
A sprite edit controller that is contained by this view controller.
Declaration
Swift
public let spriteEditController: SpriteEditController<SpriteModelType, GestureController, SelectionView>?
-
The color displayed in the color picker view.
Declaration
Swift
open var color: UIColor { get set }
-
The photo edit model.
Declaration
Swift
open var photoEditModel: PhotoEditModel { get set }
-
Creates a new
ColorPickerViewController
with the given sprite edit controller.Declaration
Swift
public required init(spriteEditController: SpriteEditController<SpriteModelType, GestureController, SelectionView>?)
Parameters
spriteEditController
A
SpriteEditController
object.
-
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()
-
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()