我有一个来自 Sqlite DB & 的数组如下:
(
{
id=1;
duedate = "01-Apr-2013";
},
{
id=2;
duedate = "01-May-2013";
},
{
id=3;
duedate = "01-Jun-2013";
},
{
id=4;
duedate = "11-Jul-2013";
}
)
我对数组进行排序的代码
NSSortDescriptor *sortDesc = [[NSSortDescriptor alloc] initWithKey:@"duedate" ascending:YES];
[assessment_list sortUsingDescriptors:[NSArray arrayWithObject:sortDesc]];
但这给出了错误的排序数组,如下所示
(
{
id=1;
duedate = "01-Apr-2013";
},
{
id=3;
duedate = "01-Jun-2013";
},
{
id=2;
duedate = "01-May-2013";
},
{
id=4;
duedate = "11-Jul-2013";
}
)
我搜索了但我没有发现这个问题