2014-10-01 5 views

답변

0

이것은 당연한 일이 아니지만 매우 간단합니다. 재생 목록이 있으면 collections 대신 items 속성을 호출하면됩니다. 예를 들어

:

MPMediaPlaylist *playlist = //.. 

// Loop through the items in the original order 
for (MPMediaItem *item in playlist.items) { 
    NSLog(@"item: %@", item.title); 
} 

// Loop through the items sorted by title 
for (MPMediaItemCollection *collection in playlist.collections) { 
    NSLog(@"collection: %@", collection.title); 
}