FUIDocumentPickerAttachmentActionDelegate

@objc
public protocol FUIDocumentPickerAttachmentActionDelegate

The delegate protocol for FUIDocumentPickerAttachmentAction.

  • The UIDocumentPickerViewController to be used in FUIDocumentPickerAttachmentAction.

    Declaration

    Swift

    var documentPicker: UIDocumentPickerViewController { get }
  • This function is invoked when a file is selected from the file picker.

    Implementation of this method by the delegate is optional. If your delegate also implements the documentPickerAttachmentAction(_:didPickFilesAt:) method, UIKit calls that method in preference to this one.

    Declaration

    Swift

    @objc
    optional func documentPickerAttachmentAction(_ action: FUIDocumentPickerAttachmentAction, didPickFileAt url: URL)

    Parameters

    action
    url

    The URL for the selected file. Note that UIDocumentPickerViewController returns a temporary url which may not be available after the UIDocumentPickerViewController session is gone. It is recommended to copy the file content to a temporary location for further use.

  • This function is invoked when files are selected from the file picker.

    Declaration

    Swift

    @objc
    optional func documentPickerAttachmentAction(_ action: FUIDocumentPickerAttachmentAction, didPickFilesAt urls: [URL])

    Parameters

    action
    urls

    An array of URLs for the selected files. Note that UIDocumentPickerViewController returns a temporary url which may not be available after the UIDocumentPickerViewController session is gone. It is recommended to copy the file content to a temporary location for further use. Implementation of this method by the delegate is optional. UIKit calls this method in preference to the documentPickerAttachmentAction(_:, didPickFileAt:) method.