1

I have an array of genres(in the form of MPMediaItem) that the user picked from a list of genres in their total library. Now I want to get all of the songs from these genres.

The array that contains the items is titled:
var GenresWanted:Array = [MPMediaItem()] at the top of the class..

How would I go about grabbing all of the songs from each of the genres contained in this array?

I want to go through each genre in the array and add all the songs that correspond to that to a new list of MPMediaItems(Or whatever object would best fit songs)

    for items in GenresWanted
    {
    //add all the songs in genre to new array
    }

I know i have to make a song query to gather all of the songs but I can't for the life of me find any reference online. I tried predicates but it caused errors. Please Help someone

Jordan Heath
  • 114
  • 8

0 Answers0