sorting an NSArray of NSDates
I have an NSArray of NSDate objects and I want to sort them so that today is at 0, yesterday at 1 etc. Is it ascending or descending, and do i use a function, selector or what? There are different sort methods for NSArray because there may be different ways you want to sort things. NSSortDescriptors are a general way that give you a lot of options as far as what keys to use in sorting, what selectors you want to use on those keys, and overall order to use, etc. Or you can use functions or comparator blocks instead if your case requires that or if that's more convenient for your particular case