FUIAttachmentAction
public protocol FUIAttachmentAction
The attachment action protocol.
-
The title of this action.
Declaration
Swift
var title: String { get }
-
The action to be performed when user tapped this action.
If it is needed, this function should first requesting user to grant the usage of resource required for this action. The action will be performed after user granted the permission.
The action should be aborted if user denied the usage permission.
Declaration
Swift
func action(onController controller: FUIAttachmentsViewController)
Parameters
controller
The
FUIAttachmentsFormViewController
. -
Check if this action is available or not on device. This
FUIAttachmentAction
in the add attachment popup will be enabled only if this function returnstrue
.It is recommended to return
true
to enable the action if the device is capable to perform this action, but it needs user interaction to grand permission to use the resource. Then, theaction
function should ask permission for the resouce from user as needed.This function should return false to disable the action if user has already denied the permission for the resource to perform this action.
Declaration
Swift
func isAvailable(_ alertAction: UIAlertAction) -> Bool
Return Value
True if this action is available on device.