Type Method

titleProperty(forGroupingType:)

Obtains the title key for a specified grouping type.

Declaration

class func titleProperty(forGroupingType groupingType: MPMediaGrouping) -> String

Parameters

groupingType

The grouping type that you want the title key for.

Return Value

The title key for the group type.

Discussion

Use this convenience method to obtain the key for the title that corresponds to a specified grouping type. For example, the following statement obtains the title key for the album grouping type:

let titleIDKey = [MPMediaItem.persistentIDProperty(forGroupingType: MPMediaGrouping.album)]

You could then obtain the specific title that you want by using the value(forProperty:) method. Grouping keys are described in MPMediaGrouping.

See Also

Obtaining Group Properties

class func persistentIDProperty(forGroupingType: MPMediaGrouping) -> String

Obtains the persistent identifier key for a specified grouping type.