How do I play music using MPMusicPlayerController?
-
21-09-2019 - |
Question
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.
Solution
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];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow