TransformToolControllerOptions

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKTransformToolControllerOptions)
open class TransformToolControllerOptions : ToolControllerOptions

Options for configuring a TransformToolController.

  • Whether to allow free cropping. If this is enabled, ‘Free’ is always the first available option. Defaults to true.

    Declaration

    Swift

    open 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

    open 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

    open let cropAspectButtonConfigurationClosure: ((LabelBorderedCollectionViewCell, CropAspect?) -> Void)?
  • This closure is called every time the user selects a crop aspect.

    Declaration

    Swift

    open 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

    open 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

    open let scalePickerConfigurationClosure: ((ScalePicker) -> Void)?
  • Creates a new instance of TransformToolControllerOptions using the given builder.

    Declaration

    Swift

    public init(builder: TransformToolControllerOptionsBuilder)

    Parameters

    builder