cocoa - IKImageBrowser loads files in reverse order? -
i have ikimagebrowser
loads images resources directory located inside app. reason, order loads file in reverse, example have images 1-74, loaded 74-1, ideas?
project based off of ikimagekit demo.
simple , 'ugly' solution:
// file: controllerbrowsing.m: // function: - (void) addimagesfromdirectory:(nsstring *) path // find: for(i=0; i<n; i++) // replace with: for(i=n-1; i>=0; i--)
good solution (one of many possibilities):
- create new nsmutablearray.
- loop through nsarray contains files.
- add paths nsmutablearray.
- sort nsmutablearray way like.
- loop trough nsmutablearray , add items.
Comments
Post a Comment