Is it possible to uniquely identify duplicate MPMediaItems within an MPMediaCollection?
I am using an MPMediaItemCollection
to hold a number of user selected music tracks from the iPod music library. I want to be able to uniquely identify ea开发者_如何学运维ch MPMediaItem
within the collection even if they are duplicated. Is this possible?
I've had the same problem as you, and Apple has just provided me the solution in iOS v5.0. There is an indexOfNowPlayingItem property in the MPMusicPlayerController class. You can use that to index into your array. This is of course if you are using MPMusicPlayerController.
精彩评论