FUITakePhotoAttachmentActionDelegate

public protocol FUITakePhotoAttachmentActionDelegate : AnyObject

The delegate protocol for FUITakePhotoAttachmentAction.

  • This function is invoked when a photo is taken from camera when the isSavedToCameraRoll property of the FUITakePhotoAttachmentAction is false.

    Important

    URL’s with scheme: assets-library refer to assets in the user’s Photos library. These assets may be deleted by the User, or cleaned-up by the library. Use the PHAssets API’s to access the image data directly, and create a persistent copy of the file, if one is needed.

    Declaration

    Swift

    func takePhotoAttachmentAction(_ action: FUITakePhotoAttachmentAction, didTakePhoto asset: PHAsset, at url: URL)

    Parameters

    action
    url

    The assets-library URL of the photo captured.

    asset

    The PHAsset of the photo.

  • This function is invoked when a photo is taken and the isSavedToCameraRoll property of the FUITakePhotoAttachmentAction is false.

    Developer is responsible to save the photo image and provide a URL to the saved image so that the image could be accessed in FUIAttachmentsFormViewDataSource implementation. Internally, FUIAttachmentsViewController is using native QLPreviewController to preview the attachment. Therefore, it is recommended that the image is saved as JPEG or PNG and the URL has an extension of JPG or PNG, respectively, so that QLPreviewController can preview the attachment.

    Default Implementation

    Declaration

    Swift

    func takePhotoAttachmentAction(_ action: FUITakePhotoAttachmentAction, didTakePhoto image: UIImage)

    Parameters

    action
    image

    The UIImage for the photo taken.

  • This function is invoked when a video is taken and the isSavedToCameraRoll property of the FUITakePhotoAttachmentAction is false.

    Developer is responsible to save the video and provide a URL to the saved video so that the video could be accessed in FUIAttachmentsFormViewDataSource implementation. Internally, FUIAttachmentsViewController is using native QLPreviewController to preview the attachment.

    Default Implementation

    Declaration

    Swift

    func takePhotoAttachmentAction(_ action: FUITakePhotoAttachmentAction, didTakeVideo url: URL)

    Parameters

    action
    url

    The URL for the video taken.