how can i get songs from my iphone's ipod to my application in array in iphone sdk?

断了今生、忘了曾经 提交于 2019-12-02 21:54:02

问题


can i store or just create a customize view which allow user to play songs within from my application when user clicks on songs at that time the iphone's iPod(MusicPlayer) picker should not open it just show all songs in my application in TableView or PickerView it allows user to select the songs within my created customized view that TableView or PickerView.i have also seen this example. but it just opens the music player picker view. did you get my point is this possible to do that within my application.?

just similar like this question

here i found link that tells use API 3.0


回答1:


Yes Amergin is write, this is the good way to get the list. Also if you want to enumerate the content of an MPMediaItem, here's a good method to do that : http://www.wptechnology.com/articles/2013/06/16/how-to-nslog-an-mpmediaitem/




回答2:


create one view for showing data and create another view to show or play song's. save all your songs in resource or in Library Fitch the songs & play.




回答3:


It seems to me that maybe you're trying to run before you can walk. It is possible to do what you ask but it is not a trivial amount of code and would involve a considerable effort for someone to describe to you how to do it. Perhaps if you start by using apple's built in offerings and then extend your app you'll learn as you go along. There are examples of how to create a tableview and populate it with your own data. There are also examples of how to access the ipod music library and query it to get whatever you want from it. Your job is to tie these two things together.




回答4:


You can do, get songs from iPod library. But you could not view it in iPhone simulator. The list of songs name is showed only in device. If u run in iPhone simulator then it shows errors.

This is the example article for u. its useful for get songs from iPod library and play songs.

The Music Player Framework in iPhone SDK 3.0

is the best example for you.



来源:https://stackoverflow.com/questions/10221955/how-can-i-get-songs-from-my-iphones-ipod-to-my-application-in-array-in-iphone-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!