albums()
Creates a media query that matches music items and that groups and sorts collections by album name.
Declaration
class func albums() -> MPMediaQueryReturn Value
A media query that matches media items of type music and has a grouping type of MPMediaGrouping.album.
Discussion
A media item can have more than one media type; for example, an item could be of types “music” and “podcast.” An albums() query matches all music items, whether or not they’re also of other media types.