MainFlowController
@available(iOS 9.0, *)
@objcMembers
@objc(PESDKMainFlowController)
open class MainFlowController : NSObject
The MainFlowController
is the EventSubscriber
of the MediaEditViewController
and all
subclasses of PhotoEditToolController
. It is responsible for presenting and dismissing tools
and forwards updated PhotoEditModel
s to each active controller. It also keeps track of the
unedited photo edit model, to check for changes.
-
The
PhotoEditModel
of this flow controller. When changing this, the edit model is set on all active controllers as well.Declaration
Swift
open var photoEditModel: PhotoEditModel { get set }
-
The configuration object that configures this editor.
Declaration
Swift
public let configuration: Configuration
-
The initial, unedited photo edit model.
Declaration
Swift
public let uneditedPhotoEditModel: PhotoEditModel
-
The
MediaEditViewController
that this flow controller manages.Declaration
Swift
open private(set) weak var mediaEditViewController: MediaEditViewController?
-
This property holds the current user interface state associated with this instance of the flow controller. It is passed to each tool before being presented, so that the tool can restore it’s state as needed. When a tool updated its state, this property is automatically updated via the corresponding
EventSubscriber
method.Declaration
Swift
open var userInterfaceState: UserInterfaceState { get set }
-
Creates a new flow controller for the given photo edit view controller and configuration.
Declaration
Swift
public convenience init(mediaEditViewController: MediaEditViewController, configuration: Configuration)
Parameters
mediaEditViewController
The media edit view controller that this flow controller manages.
configuration
The
Configuration
object to configure all tools with. -
Creates a new flow controller for the given photo edit view controller and configuration and also supplies an initial photo edit model, which can already have modifications applied.
Declaration
Swift
public required init(mediaEditViewController: MediaEditViewController, photoEditModel: PhotoEditModel, configuration: Configuration)
Parameters
mediaEditViewController
The media edit view controller that this flow controller manages.
photoEditModel
The initial photo edit model to use.
configuration
The
Configuration
object to configure all tools with.