Enumeration

UIImagePickerController.SourceType

The source to use when picking an image or when determining available media types.

Declaration

enum SourceType : Int

Overview

A given source may not be available on a given device because the source is not physically present or because it cannot currently be accessed.

Topics

Constants

case photoLibrary

Specifies the device’s photo library as the source for the image picker controller.

case camera

Specifies the device’s built-in camera as the source for the image picker controller. Indicate the specific camera you want (front or rear, as available) by using the cameraDevice property.

case savedPhotosAlbum

Specifies the device’s Camera Roll album as the source for the image picker controller. If the device does not have a camera, specifies the Saved Photos album as the source.

See Also

Setting the Picker Source

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

Returns an array of the available media types for the specified source type.

class func isSourceTypeAvailable(UIImagePickerController.SourceType) -> Bool

Returns a Boolean value indicating whether the device supports picking media using the specified source type.

var sourceType: UIImagePickerController.SourceType

The type of picker interface to be displayed by the controller.