0

how to control playback state function in MPMusicPlayer....for example i want open

ipod playlist file when the no item available at the end of next track...

how it is possible on iphone.....please help me.....

4

1 に答える 1

0

これを行う私のコードの一部を次に示します。

    MPMediaQuery *everything = [MPMediaQuery songsQuery];

[everything setGroupingType: MPMediaGroupingPlaylist];

self.playlists = [NSMutableArray arrayWithArray:[everything collections]];

....

    NSArray *songsList = [[self.playlists objectAtIndex: currentPlayListIndex] items];

int nowIndex = [songsList indexOfObject:nowPlayingViewController.nowPlayingItem];

if(++nowIndex >= [songsList count]) 
    nowIndex = 0;

if(![self playItem: [songsList objectAtIndex:nowIndex]])
于 2010-11-30T18:16:14.457 に答える