开发者

Choose Music from iPhone app? - iPhone SDK

开发者 https://www.devze.com 2022-12-11 21:01 出处:网络
Can anyone give me a head starters on this question. How would I be able to make an app that searches through your mu开发者_Python百科sic contents thatare already synced on your phone and play them. I

Can anyone give me a head starters on this question. How would I be able to make an app that searches through your mu开发者_Python百科sic contents that are already synced on your phone and play them. I don't want to do a scroll view, where the user just presses on the options. Instead I want the user to type the song name and if the song is found it will play it.

thanks,

kevin


The class you are looking for is MPMusicPlayerController. It's only available in iPhone 3.0 and above.

Get the instance for your app ([MPMusicPlayerController applicationMusicPlayer]) rather than the iPod instance. You can use this to play the songs once you've located them.

In order to do your own search rather than presenting the typical interface check out MPMediaQuery.

I found this article helpful. It's mostly about iPod player integration, but it touches on these other topics too.

0

精彩评论

暂无评论...
验证码 换一张
取 消