open class FUITakePhotoAttachmentAction : FUIAttachmentAction
This class is an implementation of
FUIAttachmentAction to allow
the user to use the camera to take a photo as an attachment in
This action requires camera usage permission from the user.
isSavedToCameraRoll property is
true, the Photo Library usage permission is also required.
The title string to be displayed for this action.
public let title: String
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
open var isSavedToCameraRoll: Bool
The types of media that are allowed.
Use this property to customize the media types allowed for this attachment action.
If this is not specified, the default is:
[kUTTypeMovie as String, kUTTypeImage as String]
This means both video and photo are allowed to be chosen.
kUTTypeImageare defined in
open var mediaTypes: [String]?
Returns a newly initialized
public init(withTitle title: String? = nil)
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 an attachment.
open func action(onController controller: FUIAttachmentsViewController)
Check if camera is supported and its usage permission has not been denied.
open func isAvailable(_ alertAction: UIAlertAction) -> Bool
True if camera is available and its usage permission has not been denied.