---
title: "titleProperty(forGroupingType:)"
framework: mediaplayer
role: symbol
role_heading: Type Method
path: "mediaplayer/mpmediaitem/titleproperty(forgroupingtype:)"
---

# titleProperty(forGroupingType:)

Obtains the title key for a specified grouping type.

## Declaration

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

## Parameters

- `groupingType`: The grouping type that you want the title key for.

## Return Value

Return Value The title key for the group type.

## Discussion

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: You could then obtain the specific title that you want by using the value(forProperty:) method. MPMediaGrouping describes grouping keys.

## See Also

### Obtaining group properties

- [persistentIDProperty(forGroupingType:)](mediaplayer/mpmediaitem/persistentidproperty(forgroupingtype:).md)
