ColorPickerViewControllerDelegate
@available(iOS 9.0, *)
public protocol ColorPickerViewControllerDelegate : AnyObject
The ColorPickerViewControllerDelegate
defines methods that allow you to respond to messages from
the ColorPickerViewController
.
-
Called when a color was selected.
Declaration
Swift
func colorPickerViewController<SpriteModelType, GestureController, SelectionView>(_ colorPickerViewController: ColorPickerViewController<SpriteModelType, GestureController, SelectionView>, didPick color: UIColor) where SpriteModelType : SpriteModel, GestureController : SpriteGestureController<SpriteModelType, SelectionView>, SelectionView : UIView
Parameters
colorPickerViewController
The color picker view controller where the color was selected.
color
The color that was selected.
-
Asks the delegate for the
SpriteViewController
to use.Declaration
Swift
func colorPickerViewControllerSpriteViewController<SpriteModelType, GestureController, SpriteSelectionView>(_ colorPickerViewController: ColorPickerViewController<SpriteModelType, GestureController, SpriteSelectionView>) -> SpriteViewController? where SpriteModelType : SpriteModel, GestureController : SpriteGestureController<SpriteModelType, SpriteSelectionView>, SpriteSelectionView : UIView
Parameters
colorPickerViewController
The color picker view controller asking for the sprite view controller.
Return Value
The
SpriteViewController
to use. -
Asks the delegate for the main preview view.
Declaration
Swift
func colorPickerViewControllerPreviewView<SpriteModelType, GestureController, SpriteSelectionView>(_ colorPickerViewController: ColorPickerViewController<SpriteModelType, GestureController, SpriteSelectionView>) -> UIView? where SpriteModelType : SpriteModel, GestureController : SpriteGestureController<SpriteModelType, SpriteSelectionView>, SpriteSelectionView : UIView
Parameters
colorPickerViewController
The color picker view controller asking for the main preview view.
Return Value
The main preview view.
-
Asks the delegate for the scroll view to which zoom events of the color picker view controller should be forwarded.
Declaration
Swift
func colorPickerViewControllerTargetScrollView<SpriteModelType, GestureController, SpriteSelectionView>(_ colorPickerViewController: ColorPickerViewController<SpriteModelType, GestureController, SpriteSelectionView>) -> UIScrollView? where SpriteModelType : SpriteModel, GestureController : SpriteGestureController<SpriteModelType, SpriteSelectionView>, SpriteSelectionView : UIView
Parameters
colorPickerViewController
The color picker view controller asking for the scroll view.
Return Value
The scroll view which should be the target of the proxy scroll view.
-
Tells the delegate that the controller’s
PhotoEditModel
changed.Declaration
Swift
func colorPickerViewControllerDidChangePhotoEditModel<SpriteModelType, GestureController, SpriteSelectionView>(_ colorPickerViewController: ColorPickerViewController<SpriteModelType, GestureController, SpriteSelectionView>) where SpriteModelType : SpriteModel, GestureController : SpriteGestureController<SpriteModelType, SpriteSelectionView>, SpriteSelectionView : UIView
Parameters
colorPickerViewController
The color picker view controller that changed the photo edit model.