app could not be continue with next song in background
I've created a simple music App for iPad using AVAudioPlayer. But the problem is that when I pressed home button it only plays current song in background. The application could not continue with 开发者_如何学编程next song in background.
this works for me
here musicPlayer is MPMusicPlayerController
[self setMusicPlayer: [MPMusicPlayerController applicationMusicPlayer]];
// By default, an application music player takes on the shuffle and repeat modes
// of the built-in iPod app. Here they are both turned off.
[musicPlayer setShuffleMode: MPMusicShuffleModeOff];
[musicPlayer setRepeatMode: MPMusicRepeatModeNone];
精彩评论