An MPMediaPickerController object, or media item picker, is a specialized view controller that you employ to provide a graphical interface for selecting media items. To display a media item picker, present it modally on an existing view controller. Media items are described in MPMediaItem.


To respond to user selections and to dismiss a media item picker, use the MPMediaPickerControllerDelegate protocol as described in MPMediaPickerControllerDelegate.


Initializing a Media Item Picker

init(mediaTypes: MPMediaType)

Initializes a media item picker for specified media types.

Using a Media Item Picker

var allowsPickingMultipleItems: Bool

A Boolean value specifying multiple (true) or single (false) selection behavior for a media item picker.

var showsCloudItems: Bool

A Boolean value specifying whether to display iCloud items (true) or not (false) for a media picker.

var delegate: MPMediaPickerControllerDelegate?

The delegate for a media item picker.

var mediaTypes: MPMediaType

The media types that media item picker presents.

var prompt: String?

A prompt, for the user, that appears above the navigation bar buttons.