iOS Developer Library

Developer

MediaPlayer Framework Reference MPMediaPredicate Class Reference

Options
Deployment Target:

On This Page
Language:

MPMediaPredicate

Inheritance


Conforms To


Import Statement


Swift

import MediaPlayer

Objective-C

@import MediaPlayer;

Availability


Available in iOS 3.0 and later.

Use this class’s concrete subclass, described in MPMediaPropertyPredicate Class Reference, to define the filter in a media query to retrieve a subset of media items from the iPod library. Media queries are described in MPMediaQuery Class Reference.

In iPod library queries, a predicate is a statement of a logical condition that you want to test each media item against. Those media items that satisfy the condition are retrieved in the query result.