A blog with tutorials and solutions to the problems an every day programmer will hit who's new to cocos2d
Follow on twitter http://twitter.com/#!/Ant_Run
Friday, 5 August 2011
How to sort an array in ascending/descending order, easily!
So many people create their own functions to loop through an array and comparing the values to each other and sorting it that way, which takes far too much effort for me! No one seems to know about this on google, cause I searched for ages trying to find an easy way to do this. Simply do;
NSMutableArray *arrayOfLevelSaves = //your array full of numbers;