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