FUIDocumentPickerAttachmentActionDelegate
@objc
public protocol FUIDocumentPickerAttachmentActionDelegate
The delegate protocol for FUIDocumentPickerAttachmentAction.
-
The
UIDocumentPickerViewControllerto be used inFUIDocumentPickerAttachmentAction.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
actionThe
FUIDocumentPickerAttachmentActionobject.urlThe URL for the selected file. Note that
UIDocumentPickerViewControllerreturns a temporary url which may not be available after theUIDocumentPickerViewControllersession 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
actionThe
FUIDocumentPickerAttachmentActionobject.urlsAn array of URLs for the selected files. Note that
UIDocumentPickerViewControllerreturns a temporary url which may not be available after theUIDocumentPickerViewControllersession 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 thedocumentPickerAttachmentAction(_:, didPickFileAt:)method.