FUITakePhotoAttachmentAction
public class FUITakePhotoAttachmentAction : FUIAttachmentAction
This class is an implementation of FUIAttachmentAction
to allow
user to use camera to take a photo as an attachment in FUIAttachmentsFormView
.
This action requires camera usage permission from user.
If isSavedToCameraRoll
property is true
, the photo library usage permission is also required.
-
The title string to be displayed for this action.
Declaration
Swift
public let title: String
-
An implementation of
FUITakePhotoAttachmentActionDelegate
.Declaration
Swift
public weak var delegate: FUITakePhotoAttachmentActionDelegate?
-
Indicates if the photo taken should be saved to the camera roll or not. If this is
false
, developers need to manage the returned photo images.The default is
true
.Declaration
Swift
public var isSavedToCameraRoll: Bool
-
Returns a newly initialized
FUITakePhotoAttachmentAction
.Declaration
Swift
public init(withTitle title: String? = nil)
Parameters
title
The title string for this action. If this is not specified, the default title
Take Photo
will be used. -
A camera view will be shown for user to take a photo as attachment.
Declaration
Swift
public func action(onController controller: FUIAttachmentsViewController)
Parameters
controller
The
FUIAttachmentsFormViewController
. -
Check if camera is supported and its usage permission has not been denied.
Declaration
Swift
public func isAvailable(_ alertAction: UIAlertAction) -> Bool
Return Value
True if camera is available and its usage permission has not been denied.