I am trying to sort an array of MPMediaItem objects according to the recently played song. The sorting runs fine in case of different dates. But when I play multiple songs on the same date, the sorting fails to do the distinction.
Asked
Active
Viewed 154 times
-1
-
1How are you currently sorting them? Code helps a lot. – jjatie Sep 07 '16 at 10:12
1 Answers
0
Actually if the song is not heard completely in the device, its timestamp comes as nil, and so it does not comes at the right index of your sorted array. So, according to date the sorting was running fine, but it was not able to compare in case of exact time.

Ghazalah
- 233
- 2
- 14