Let's say i want to order by name all songs from a specific, say "My playlist", Playlist, and play song 100 in that playlist.
Is it possible at all?
Let's say i want to order by name all songs from a specific, say "My playlist", Playlist, and play song 100 in that playlist.
Is it possible at all?
I haven't tested this, but the code below is a start to retrieve a playlist and play its 100th item. However, it does not sort the playlist by tite. For that, you could iterate over the playlist items, retrieve all their names, and put the names into a dictionary with the
MPMediaItem
objects as keys (don't know if this works). You can then sort by the song titles by calling-keysSortedByValueUsingSelector:
on the dictionary, which returns an array of media items. Take the 100th element from this array and feed it to the music player.