BrushToolControllerOptionsBuilder

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKBrushToolControllerOptionsBuilder)
open class BrushToolControllerOptionsBuilder : ToolControllerOptionsBuilder

The default BrushToolControllerOptionsBuilder for BrushToolControllerOptions.

  • Defines all allowed tools. The brush tool buttons are always shown in the given order. Defaults to show all available brush tools.

    Declaration

    Swift

    open var allowedBrushTools: [BrushTool]
  • This closure allows further configuration of the brush tool buttons. The closure is called for each brush tool button and has the button and its corresponding brush tool as parameters.

    Declaration

    Swift

    open var brushToolButtonConfigurationClosure: ((MenuCollectionViewCell, BrushTool) -> Void)?
  • This closure is called every time the user selects a tool.

    Declaration

    Swift

    open var brushToolSelectedClosure: ((BrushTool) -> Void)?
  • This closure can be used to configure the slider that is visible when selecting a brush tool.

    Declaration

    Swift

    open var sliderConfigurationClosure: ((Slider) -> Void)?
  • This closure can be used to configure the view that contains the slider and that is visible when selecting a brush tool.

    Declaration

    Swift

    open var sliderContainerConfigurationClosure: ViewConfigurationClosure?
  • This closure will be called whenever the value of the slider changes. The Slider and the active BrushTool will be passed as parameters.

    Declaration

    Swift

    open var sliderChangedValueClosure: ((Slider, BrushTool) -> Void)?
  • This closure allows further configuration of the overlay buttons. The closure is called for each button and has the button and its corresponding enum value as parameters.

    Declaration

    Swift

    open var overlayButtonConfigurationClosure: ((OverlayButton, BrushOverlayAction) -> Void)?
  • Defines all allowed actions. Only buttons for allowed actions are visible. Defaults to show all available actions.

    Declaration

    Swift

    open var allowedBrushOverlayActions: [BrushOverlayAction]
  • This closure is called when the user selects an action.

    Declaration

    Swift

    open var brushActionSelectedClosure: ((BrushOverlayAction) -> Void)?
  • The minimum size that a brush can have. This can either be a value that’s relative to the smaller side of the photo that the user is editing or an absolute value in pixels. Default is .absolute(1).

    Declaration

    Swift

    open var minimumBrushSize: FloatValue
  • The maximum size that a brush can have. This can either be a value that’s relative to the smaller side of the photo that the user is editing or an absolute value in pixels. Default is .relative(0.125).

    Declaration

    Swift

    open var maximumBrushSize: FloatValue
  • The default size that a brush has. This can either be a value that’s relative to the smaller side of the photo that the user is editing or an absolute value in pixels. Default is .relative(0.05).

    Declaration

    Swift

    open var defaultBrushSize: FloatValue
  • The minimum hardness factor a brush can have.

    Declaration

    Swift

    open var minimumBrushHardness: CGFloat
  • The maximum hardness factor a brush can have.

    Declaration

    Swift

    open var maximumBrushHardness: CGFloat
  • The default hardness factor a brush has.

    Declaration

    Swift

    open var defaultBrushHardness: CGFloat
  • The default color a brush has.

    Declaration

    Swift

    open var defaultBrushColor: UIColor
  • false if the hardness of the brush should vary by the size of the brush, true otherwise. Default is false.

    Declaration

    Swift

    open var usesUniformHardness: Bool
  • The insets used to layout the overlay buttons in their container. The .top value is ignored.

    Declaration

    Swift

    open var overlayButtonInsets: UIEdgeInsets
  • Creates a new instance of BrushToolControllerOptionsBuilder initialized with the given options.

    Declaration

    Swift

    public init(options: BrushToolControllerOptions)

    Parameters

    options
  • An array of BrushTool raw values wrapped in NSNumbers. Setting this property overrides any previously set values in allowedBrushTools with the corresponding BrushTool values.

    Declaration

    Swift

    @objc(allowedBrushTools)
    open var _objCAllowedBrushTools: [NSNumber] { get set }
  • An array of BrushOverlayAction raw values wrapped in NSNumbers. Setting this property overrides any previously set values in allowedBrushOverlayActions with the corresponding BrushOverlayAction values.

    Declaration

    Swift

    @objc(allowedBrushOverlayActions)
    open var _objCAllowedBrushOverlayActions: [NSNumber] { get set }
  • The minimum size that a brush can have. This can either be a value that’s relative to the smaller side of the photo that the user is editing or an absolute value in pixels. Default is .absolute(1).

    Declaration

    Swift

    @objc(minimumBrushSize)
    open var _objCMinimumBrushSize: _ObjCFloatValue { get set }
  • The maximum size that a brush can have. This can either be a value that’s relative to the smaller side of the photo that the user is editing or an absolute value in pixels. Default is .relative(0.125).

    Declaration

    Swift

    @objc(maximumBrushSize)
    open var _objCMaximumBrushSize: _ObjCFloatValue { get set }
  • The default size that a brush has. This can either be a value that’s relative to the smaller side of the photo that the user is editing or an absolute value in pixels. Default is .relative(0.05).

    Declaration

    Swift

    @objc(defaultBrushSize)
    open var _objCDefaultBrushSize: _ObjCFloatValue { get set }