FUIAttachmentsViewControllermanages the presentation of a collection of attachment thumbnails, and previews of specific files.
The controller also supports presentation of an “Add Attachment” action sheet, which displays a list of
FUIAttachmentActionoptions. Attachment actions are typically used for acquiring (adding) attachments. Default
FUIAttachmentActionimplementations are provided, for obtaining data from the camera, or photo albums. Developers should add
FUIAttachmentActioninstances to the controller, using
Presenting Attachment Previews
FUIAttachmentsViewControlleruses a native
QLPreviewControllerto present file previews, when the user taps on an attachment icon. The
QLPreviewControllerrequires a valid file URL, and will request the URL for a selected attachment, in the
urlForAttachmentAtIndex:method. If the developer returns
nil, or, if the
QLPreviewControllercannot handle the URL provided, then the
couldNotPresentAttachmentAtIndex:method will be invoked. The developer should handle the presentation for these cases, using a custom view controller, or other presentation framework.
Supported style classes
open class FUIAttachmentsViewController : UIViewController, QLPreviewControllerDataSource, QLPreviewControllerDelegate
The attachment action protocol.See more
public protocol FUIAttachmentAction
This class is an implementation of
FUIAttachmentActionto allow the user to use the camera to take a photo as an attachment in
This action requires camera usage permission from the user. IfSee more
true, the Photo Library usage permission is also required.
open class FUITakePhotoAttachmentAction : FUIAttachmentAction