FrameEditController

@available(iOS 9.0, *)
@objc(PESDKFrameEditController)
open class FrameEditController : TransformEditController

A FrameEditController displays a Frame above the edited image and provides manipulation options using rotate, pinch and pan gestures. It is supposed to be contained in a tool controller and be presented above a PhotoEditPreviewController.

Properties

  • Whether rotation is enabled. true by default.

    Declaration

    Swift

    open var rotationEnabled: Bool
  • The image view that displays the frame.

    Declaration

    Swift

    open private(set) lazy var frameImageView: UIImageView = {
      let imageView = UIImageView()
      imageView.setContentCompressionResistancePriority(UILayoutPriority(UILayoutPriority.defaultHigh.rawValue - 1), for: .horizontal)
      imageView.setContentCompressionResistancePriority(UILayoutPriority(UILayoutPriority.defaultHigh.rawValue - 1), for: .vertical)
      imageView.translatesAutoresizingMaskIntoConstraints = false
    
      if #available(iOS 11.0, *) {
        imageView.accessibilityIgnoresInvertColors = true
      }
    
      return imageView
    }()

Frame

  • Sets the frame with the given image.

    Declaration

    Swift

    open func setFrame(_ frame: Frame?, with image: UIImage?)

    Parameters

    frame

    The frame to display.

    image

    The image that belongs to the frame.