Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能建议我如何在我的应用程序中使用 MPMusicPlayerController 播放音乐。
任何人的帮助将不胜感激。
谢谢你,莫尼什。
创建一个MPMediaPickerController,以便您可以从 iPod 中选择一些音乐,然后在mediaPicker:didPickMediaItems:回调中执行以下操作:
MPMediaPickerController
mediaPicker:didPickMediaItems:
MPMusicPlayerController* playa; playa = [MPMusicPlayerController applicationMusicPlayer]; [playa setQueueWithItemCollection:mediaItemCollection]; [playa play];