I have a NSDictionary that parsed to an array one of the element is date, i tried using [startimeArray sortUsingSelector:@selector(compare:)]; (starttimeArray)
[startimeArray sortUsingSelector:@selector(compare:)];
There is the swift solution for the checked solution :
let sortedArray = randomArray.sortedArrayUsingComparator { (d1, d2) -> NSComparisonResult in return (d1 as! NSDate).compare(d2 as! NSDate) }