Sort files and display in iOS
Posted: Mon Sep 22, 2014 5:43 am
Hi,
I've built an iOS app in which one part is to display list of files saved in the iOS device special folder path "documents".
I need to sort the files by date (newest entry to oldest entry) before displaying them in the field list.
How I sort the files:
It works and the files are sorted nicely on my Mac.
But when the app is transferred to my iPod, the list is not sorted (or more specifically, there are sorted by alphabetical order).
Is it due to the filesystem in mobile is different from desktop/laptop?
Is there any better way to sort files by newest to oldest and be displayed on mobile device?
Appreciate any help and advice!
Thank you.
I've built an iOS app in which one part is to display list of files saved in the iOS device special folder path "documents".
I need to sort the files by date (newest entry to oldest entry) before displaying them in the field list.
How I sort the files:
Code: Select all
put the detailed files into tmp
sort lines of tmp descending by item 4 of each
But when the app is transferred to my iPod, the list is not sorted (or more specifically, there are sorted by alphabetical order).
Is it due to the filesystem in mobile is different from desktop/laptop?
Is there any better way to sort files by newest to oldest and be displayed on mobile device?
Appreciate any help and advice!
Thank you.