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.
我正在开发一个应用程序。我需要获取我的设备中有多少音乐文件。我使用 MPMediaPickerController 来选择音乐文件。但我想获取设备打开的文件数量并选择文件来自选择器。所以请告诉我如何获得该号码。
要获取所有歌曲,请使用以下命令
MPMediaQuery *allSongsQuery= [MPMediaQuery songsQuery]; NSArray *songs = [allSongsQuery collections];
如果你想打开和选择,你将不得不做更多的工作