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.
如果我正在使用
MusicPlayer = MPMusicPlayerController.iPodMusicPlayer()
要获取 MPMusicPlayerController 如何跳过所有歌曲以获取一首名为“示例歌曲”的歌曲(这行代码让我使用 iOS 设备的所有歌曲的音乐播放器)?
您将需要使用 Media Player 框架来探索音乐库并找到您想要的歌曲。然后,您可以将其放入队列中并将该队列交给 iPod 音乐播放器。请注意,如果您只想播放歌曲,则可能有比通过 iPod 音乐播放器更好的方法;但是在任何情况下,探索音乐库的过程都是一样的。