iphone开发:取音乐列表
来源:未知 责任编辑:智问网络 发表时间:2013-11-04 19:43 点击:次
MPMediaQuery *myPlaylistsQuery = [MPMediaQuery songsQuery];
NSArray *playlists = [myPlaylistsQuery collections];
for (MPMediaPlaylist *playlist in playlists) {
NSArray *songs = [playlist items];
for (MPMediaItem *song in songs)
{
Song *song1 = [[Song alloc] init];
song1.songName = [song valueForProperty: MPMediaItemPropertyTitle];
song1.singerName = [song valueForKey:MPMediaItemPropertyPodcastTitle];
[self.mySongArray addObject:song1];
//NSLog(@"song1.songName====%@",song1.songName);
[song1 release];
}
}
摘自 云怀空-abel
相关新闻>>
- 发表评论
-
- 最新评论 更多>>