Contents

availableMediaTypes(for:)

Retrieves the available media types for the specified source type.

Declaration

class func availableMediaTypes(for sourceType: UIImagePickerController.SourceType) -> [String]?

Parameters

  • sourceType:

    The source to use to pick an image.

Return Value

An array whose elements identify the available media types for the specified source type.

Discussion

Some iOS devices support video recording. Use this method, along with the isSourceTypeAvailable(_:) method, to determine if video recording is available on a device. The availability of video recording is indicated by the presence of the kUTTypeMovie media type for the UIImagePickerController.SourceType.camera source type.

See Also

Setting the picker source