PhotoEditViewControllerDelegate
@available(iOS 9.0, *)
@objc(PESDKPhotoEditViewControllerDelegate)
public protocol PhotoEditViewControllerDelegate
The PhotoEditViewControllerDelegate
protocol defines methods that allow you to respond to the
events of an instance of PhotoEditViewController
.
-
Called when the output image was generated. If no changes have been applied to an image this will return the original input image and an empty
Data
instance if the inputPhoto
object was not created withinit(data:)
orinit(url:)
.Declaration
Swift
@objc(photoEditViewController:didSaveImage:imageAsData:) func photoEditViewController(_ photoEditViewController: PhotoEditViewController, didSave image: UIImage, and data: Data)
Parameters
photoEditViewController
The photo edit view controller that created the output image.
image
The output image that was generated.
data
The output image that was generated as
Data
if available. -
Called when the output image could not be generated.
Declaration
Swift
@objc func photoEditViewControllerDidFailToGeneratePhoto(_ photoEditViewController: PhotoEditViewController)
Parameters
photoEditViewController
The photo edit view controller that was unable to generate the output image.
-
Called when the user wants to dismiss the editor.
Declaration
Swift
@objc func photoEditViewControllerDidCancel(_ photoEditViewController: PhotoEditViewController)
Parameters
photoEditViewController
The photo edit view controller that is asking to be cancelled.