TransformToolControllerOptions

@available(iOS 9.0, *)
@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. Defaults to true.

    Declaration

    Swift

    public let allowFreeCrop: Bool
  • Defines all allowed crop aspects. The crop aspect buttons are shown in the given order. Defaults to 1:1, 16:9, 4:3 and 3: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