0
我有字典使用sortUsingDescriptors對日期字符串進行排序?
points = 200;
startDate = "Jun 04, 2011, 13:15 PM";
points = 200;
startDate = "May 01, 2011, 11:15 PM";
and -------
的陣列我要做的startDate的基礎上排序的數量。
我已經使用通過此方法排序的前面像數字..字母排序等數:
-(NSMutableArray*)SortEventsArray:(NSMutableArray*)arrayToSort :(NSString*)sortExpression
{
NSSortDescriptor *mySorter = [[NSSortDescriptor alloc] initWithKey:sortExpression ascending:YES];
[arrayToSort sortUsingDescriptors:[NSMutableArray arrayWithObject:mySorter]];
return arrayToSort;
}
,但其不工作的日期字符串。
請幫