MPMediaPickerControllerDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/MediaPlayer.framework
Availability
Available in iOS 3.0 and later.
Companion guide
Declared in
MPMediaPickerController.h
Related sample code

Overview

The delegate for a media item picker can respond to a user making media item selections. The delegate is also responsible for dismissing the media item picker from the parent view controller. The methods in this protocol are optional.

Media items are described in MPMediaItem Class Reference. Media item pickers are described in MPMediaPickerController Class Reference.

Tasks

Responding to User Actions

Instance Methods

mediaPicker:didPickMediaItems:

Called when a user has selected a set of media items.

- (void)mediaPicker: (MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection
Parameters
mediaPicker

The media item picker to dismiss.

mediaItemCollection

The selected media items.

Availability
  • Available in iOS 3.0 and later.
Declared In
MPMediaPickerController.h

mediaPickerDidCancel:

Called when a user dismisses a media item picker by tapping Cancel.

- (void)mediaPickerDidCancel:(MPMediaPickerController *)mediaPicker
Parameters
mediaPicker

The media item picker to dismiss.

Availability
  • Available in iOS 3.0 and later.
Declared In
MPMediaPickerController.h