Instance Property

representativeItem

A media item whose properties are representative of the other media items in a collection.

Declaration

@property(nonatomic, readonly) MPMediaItem *representativeItem;

Discussion

The media items in a collection typically share common property values, owing to how the collection was built. For example, if you build a collection based on a predicate that uses the MPMediaItemPropertyArtist property, all items in the collection share the same artist name. You can use the representativeItem property to efficiently obtain values for such common properties—often more efficiently than fetching an item from the items array.

See Also

Using a Media Item Collection

items

The media items in a media item collection.

count

The number of media items in a collection.

mediaTypes

The types of the media items in a collection.