Làm cách nào có thể Play một danh sách nhạc như thế này các anh em.
Mình tìm được đoạn code này nhưng không biết thực hiện như thế nào?
Code:
MPMediaQuery *myPlaylistsQuery = [MPMediaQuery playlistsQuery];
NSArray *playlists = [myPlaylistsQuery collections];
for (MPMediaPlaylist *playlist in playlists) {
NSLog (@"%@", [playlist valueForProperty: MPMediaPlaylistPropertyName]);
NSArray *songs = [playlist items];
for (MPMediaItem *song in songs) {
NSString *songTitle =
[song valueForProperty: MPMediaItemPropertyTitle];
NSLog (@"\t\t%@", songTitle);
}
}