TransformToolControllerOptions
@objcMembers
@objc(PESDKTransformToolControllerOptions)
open class TransformToolControllerOptions : ToolControllerOptions
Options for configuring a TransformToolController
.
-
Whether to show a reset button to reset the applied crop, rotation and straighten angle. Defaults to
true
.Declaration
Swift
public let showResetButton: Bool
-
Whether to allow free cropping. If this is enabled, ‘Free’ is always the first available option. If disabled, the asset will be cropped automatically using the best fitting aspect from
allowedCropAspects
or in case thatMediaEditViewControllerOptions.forceCropMode
is set totrue
the user will be forced to pick one of theallowedCropAspects
at launch. Defaults totrue
.Declaration
Swift
public let allowFreeCrop: Bool
-
Defines all allowed crop aspects. The crop aspect buttons are shown in the given order. If the size of the asset is not fitting one of these aspects and
allowFreeCrop
is disabled, it is automatically cropped using the best fitting aspect from this array. Defaults to1:1
,16:9
,4:3
and3:2
.Declaration
Swift
public let allowedCropAspects: [CropAspect]
-
This closure allows further configuration of the crop aspect buttons. The closure is called for each crop aspect button and has the button and its corresponding crop aspect as parameters.
Declaration
Swift
public let cropAspectButtonConfigurationClosure: ((MenuCollectionViewCell, CropAspect?) -> Void)?
-
This closure is called every time the user selects a crop aspect.
Declaration
Swift
public let cropAspectSelectedClosure: ((CropAspect?) -> Void)?
-
This closure allows further configuration of the transform buttons, i.e. rotate left and flip. The closure is called for each button and has the button and its corresponding transform action as parameters. The scalepicker to choose the straighten angle, has its own configuration closeure.
Declaration
Swift
public let transformButtonConfigurationClosure: ((Button, TransformAction) -> Void)?
-
This closure alloes further configuration of the scale picker. This UI element is used to choose the straighten angle.
Declaration
Swift
public let scalePickerConfigurationClosure: ((ScalePicker) -> Void)?
-
This closure alloes further configuration of the scale picker container view.
Declaration
Swift
public let scalePickerContainerViewConfigurationClosure: ((UIView) -> Void)?
-
Creates a new instance of
TransformToolControllerOptions
using the given builder.Declaration
Swift
public init(builder: TransformToolControllerOptionsBuilder)
Parameters
builder
A
TransformToolControllerOptionsBuilder
object.