问题
Can any one suggest me how to play the music using MPMusicPlayerController in my application.
Anyone's help will be very much appreciated.
Thank you, Monish.
回答1:
Create a MPMediaPickerController
so you can choose some music from the iPod,
then in the mediaPicker:didPickMediaItems:
call back you do this:
MPMusicPlayerController* playa;
playa = [MPMusicPlayerController applicationMusicPlayer];
[playa setQueueWithItemCollection:mediaItemCollection];
[playa play];
来源:https://stackoverflow.com/questions/2288747/how-do-i-play-music-using-mpmusicplayercontroller