BrushToolControllerOptions
@available(iOS 9.0, *)
@objc(PESDKBrushToolControllerOptions)
open class BrushToolControllerOptions : ToolControllerOptions
Options for configuring an BrushToolController
.
-
Defines all allowed tools. The brush tool buttons are shown in the given order. Defaults to show all available tools.
Declaration
Swift
public let 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
public let brushToolButtonConfigurationClosure: ((MenuCollectionViewCell, BrushTool) -> Void)?
-
This closure is called every time the user selects a tool.
Declaration
Swift
public let brushToolSelectedClosure: ((BrushTool) -> Void)?
-
This closure can be used to configure the slider that is visible when selecting a brush tool.
Declaration
Swift
public let 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
public let sliderContainerConfigurationClosure: ViewConfigurationClosure?
-
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
public let overlayButtonConfigurationClosure: ((OverlayButton, BrushOverlayAction) -> Void)?
-
Defines all allowed actions. Only buttons for allowed actions are visible. Defaults to show all available actions.
Declaration
Swift
public let allowedBrushOverlayActions: [BrushOverlayAction]
-
This closure is called when the user selects an action.
Declaration
Swift
public let 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
public let 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
public let 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
public let defaultBrushSize: FloatValue
-
The minimum hardness factor a brush can have.
Declaration
Swift
public let minimumBrushHardness: CGFloat
-
The maximum hardness factor a brush can have.
Declaration
Swift
public let maximumBrushHardness: CGFloat
-
The default hardness factor a brush has.
Declaration
Swift
public let defaultBrushHardness: CGFloat
-
The default color a brush has.
Declaration
Swift
public let defaultBrushColor: UIColor
-
false
if the opacity of the brush should vary by the size of the brush,true
otherwise. Default isfalse
.Declaration
Swift
public let usesUniformHardness: Bool
-
The insets used to layout the overlay buttons in their container. The
.top
value is ignored.Declaration
Swift
public let overlayButtonInsets: UIEdgeInsets
-
Creates a new instance of
BrushToolControllerOptions
using the given builder.Declaration
Swift
public init(builder: BrushToolControllerOptionsBuilder)
Parameters
builder
A
BrushToolControllerOptionsBuilder
instance.