A specialized view controller that provides a graphical interface for selecting media items.
SDKs
- iOS 3.0+
- Mac Catalyst 13.0+
Framework
- Media Player
Declaration
class MPMediaPickerController : UIView Controller
Overview
An MPMedia
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. Presenting an MPMedia
in non-modal mode; for example, pushing a MPMedia
onto an existing UINavigation
stack will cause your app to crash. Media items are described in MPMedia
.
To respond to user selections and to dismiss a media item picker, use the MPMedia
protocol.
Notes
The MPMedia
class supports portrait mode only. This class does support subclassing. The view hierarchy for this class is private; do not modify the view hierarchy.