Instance Property

count

The number of media items in a collection.

Declaration

var count: Int { get }

Discussion

In some cases, using this property is more efficient than fetching the items array and asking for the count.

See Also

Using a Media Item Collection

var items: [MPMediaItem]

The media items in a media item collection.

var representativeItem: MPMediaItem?

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

var mediaTypes: MPMediaType

The types of the media items in a collection.