OverlayEditController
@available(iOS 9.0, *)
@objcMembers
@objc(PESDKOverlayEditController)
open class OverlayEditController : ViewController
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.
-
The contained
SliderEditController
.Declaration
Swift
public let sliderEditController: SliderEditController<Slider>
-
The container for the blend mode collection view. This view displays a light gradient.
Declaration
Swift
public let blendModeContainerView: GradientView
-
The collection view that displays the currently selected blend mode.
Declaration
Swift
public let blendModeCollectionView: MenuCollectionView
-
The blend modes that are displayed.
Declaration
Swift
open var blendModes: [BlendMode] { get set }
-
The photo edit model.
Declaration
Swift
open var photoEditModel: PhotoEditModel { get set }
-
The currently active overlay.
Declaration
Swift
open var overlay: Overlay? { get set }
-
An object that acts as the delegate.
Declaration
Swift
open weak var delegate: OverlayEditControllerDelegate?
-
Whether to show the intensity slider,
true
by default.Declaration
Swift
open var showOverlayIntensitySlider: Bool { get set }
-
Whether to show the blend mode selection view,
true
by default.Declaration
Swift
open var showBlendModeCollectionView: Bool
-
The default initial intensity when selecting a new overlay,
1
by default.Declaration
Swift
open var initialOverlayIntensity: CGFloat
-
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
-
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
-
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.