OverlayEditController

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKOverlayEditController)
open class OverlayEditController : ViewController
extension OverlayEditController: UICollectionViewDataSource
extension OverlayEditController: UICollectionViewDelegate, UICollectionViewDelegateFlowLayout
extension OverlayEditController: SliderEditControllerDelegate
extension OverlayEditController: PhotoPreviewControlling
extension OverlayEditController: PhotoEditModelSettable

A OverlayEditController displays controls to update the blend mode and intensity of an overlay. It is supposed to be contained in a tool controller and be presented above a PhotoEditPreviewController. It contains a SliderEditController to present a slider to control the overlay intensity.

Properties

Public API

  • Changes the currently active blend mode.

    Declaration

    Swift

    open func selectBlendMode(_ blendMode: BlendMode, animated: Bool)

    Parameters

    blendMode

    The new blend mode.

    animated

    Whether to animate this change.

  • Selects the next available blend mode.

    Declaration

    Swift

    open func selectNextBlendMode(animated: Bool)

    Parameters

    animated

    Whether to animate this change.

  • Shows the intensity slider based on showOverlayIntensitySlider.

    Declaration

    Swift

    open func showControls(animated: Bool)

    Parameters

    animated

    Whether to animate this change.

  • Hides the intensity slider.

    Declaration

    Swift

    open func hideControls(animated: Bool)

    Parameters

    animated

    Whether to animate this change.

  • Shows the blend mode collection view.

    Declaration

    Swift

    open func showBlendModes(animated: Bool)

    Parameters

    animated

    Whether to animate this change.

  • Hides the blend mode collection view.

    Declaration

    Swift

    open func hideBlendModes(animated: Bool)

    Parameters

    animated

    Whether to animate this change.

  • Whether the blend mode collection view is currently hidden or not.

    Declaration

    Swift

    open private(set) var isBlendModeViewHidden: Bool { get }

Blend Mode View

  • The time it takes until the blend mode collection view will fade out after switching blend modes. Default is two seconds.

    Declaration

    Swift

    open var blendModeHideTimeInterval: TimeInterval

Overlay

  • Changes the currently set overlay.

    Declaration

    Swift

    open func setOverlay(_ overlay: Overlay?, animated: Bool)

    Parameters

    overlay

    The new overlay or nil to disable the overlay.

    animated

    Whether to animate this change.

  • This is a boxed property which exposes a Swift struct to Objective-C. This property should only be used if you are using Objective-C.

    Every invocation of the getter will return a new (temporary) object wrapping the underlying Swift struct. Boxed properties cannot be chained with the dot syntax for mutable access of nested properties in place. Use the setter with the assignment operator instead to modify boxed properties, e.g.:

    PESDKPhotoEditModel *photoEditModel = [[PESDKPhotoEditModel alloc] init];
    
    // CORRECT:
    // get boxed `AdjustmentModel`
    PESDKAdjustmentModel *adjustmentModel = photoEditModel.adjustmentModel;
    // modify boxed `AdjustmentModel`
    adjustmentModel.brightness = 0.5;
    // set modified boxed `AdjustmentModel`
    photoEditModel.adjustmentModel = adjustmentModel;
    
    // WRONG:
    photoEditModel.adjustmentModel.brightness = 0.5;
    

    Declaration

    Swift

    var boxedPhotoEditModel: _ObjCPhotoEditModel { get set }