BrushEditControllerDelegate
@objc(PESDKBrushEditControllerDelegate)
public protocol BrushEditControllerDelegate : AnyObject
The BrushEditControllerDelegate
defines methods that allow you to respond to message from
the BrushEditController
.
-
Tells the delegate when the preview view’s preferred insets changed.
Declaration
Swift
func brushEditController(_ brushEditController: BrushEditController, didChangePreferredPreviewViewInsetsAnimated animated: Bool)
Parameters
brushEditController
The brush edit controller object that changed the insets.
animated
Whether or not this change should be animated.
-
Tells the delegate that the controller’s
PhotoEditModel
changed.Declaration
Swift
func brushEditControllerPhotoEditModelDidChange(_ brushEditController: BrushEditController)
Parameters
brushEditController
The brush edit controller that changed the photo edit model.
-
Asks the delegate for the scroll view to which zoom events of the brush edit controller should be forwarded.
Declaration
Swift
func brushEditControllerTargetScrollView(_ brushEditController: BrushEditController) -> UIScrollView?
Parameters
brushEditController
The brush edit controller asking for the scroll view.
Return Value
The scroll view which should be the target of the proxy scroll view.
-
Asks the delegate for the
SpriteViewController
.Declaration
Swift
func brushEditControllerSpriteViewController(_ brushEditController: BrushEditController) -> SpriteViewController?
Parameters
brushEditController
The brush edit controller asking for the sprite view controller.
Return Value
An instance of
SpriteViewController
. -
Tells the delegate that the brush size was updated.
Declaration
Swift
func brushEditController(_ brushEditController: BrushEditController, didUpdateToSize size: CGFloat)
Parameters
brushEditController
The brush edit controller that updated the brush size.
size
The new size of the brush.
-
Tells the delegate that the brush hardness was updated.
Declaration
Swift
func brushEditController(_ brushEditController: BrushEditController, didUpdateToHardness hardness: CGFloat)
Parameters
brushEditController
The brush edit controller that updated the brush hardness.
hardness
The new harndess of the brush.
-
Tells the delegate that the slider contained in the brush edit controller did start sliding.
Declaration
Swift
func brushEditControllerDidStartSliding(_ brushEditController: BrushEditController)
Parameters
brushEditController
The brush edit controller where sliding started.
-
Tells the delegate that the slider contained in the brush edit controller did end sliding.
Declaration
Swift
func brushEditControllerDidEndSliding(_ brushEditController: BrushEditController)
Parameters
brushEditController
The brush edit controller where sliding ended.