PhotoEditViewController
@available(iOS 9.0, *)
@objcMembers
@objc(PESDKPhotoEditViewController)
open class PhotoEditViewController : MediaEditViewController
A PhotoEditViewController
is the main starting point for the SDK. It displays the rendered
photo and a menu. It can present PhotoEditToolController
objects and react to changes. It
can be presented on its own (thus displaying a toolbar for navigation at the bottom) or be
embedded into a UINavigationController
(thus using the navigation controller’s navigation bar
for navigation).
-
An object that acts as the delegate.
Declaration
Swift
open weak var delegate: PhotoEditViewControllerDelegate?
-
Creates a new
PhotoEditViewController
for the givenPhoto
, the given configuration and photo edit model.Declaration
Swift
public required init(photoAsset: Photo, configuration: Configuration = Configuration(), photoEditModel: PhotoEditModel = PhotoEditModel())
Parameters
photoAsset
The photo to edit.
configuration
The configuration options to apply.
photoEditModel
The initial photo edit model to apply to the photo.
-
Applies all changes to the high resolution image and calls the delegate methods.
Declaration
Swift
open override func renderHighResolutionVariant()
-
Serializes all currently applied operations into a single file, which may be restored on other platforms to continue editing.
Declaration
Swift
open func serializedSettings(withImageData includeImageData: Bool) -> Data?
Parameters
includeImageData
Whether or not to include the base64 encoded JPEG image within the generated image.
Return Value
The serialized settings.
-
Creates a new
PhotoEditViewController
for the givenPhoto
and the given configuration, using the default photo edit model.Declaration
Swift
convenience init(photoAsset: Photo, configuration: Configuration)
Parameters
photoAsset
The photo to edit.
configuration
The configuration options to apply.