我在使用分段tableview时遇到问题。分段表视图正在排序我的数据并以asc或desc顺序显示。我使用order by子句从数据库中获取数据,现在想要显示,但tableview正在弄乱我的排序数据。建议我避免这种情况的方法。
这是数据
{
Today = (
{
AlertTime = 1;
DateFormatWithAMPM = "11-16-2013 01:45 PM";
DateOfTask = Today;
FolderId = 2;
FolderName = Routine;
FolderStatus = 0;
Notes = "Task 2";
Status = 1;
TaskDate = "2013-11-16 13:45:45";
TaskDateFormatted = "11-16-2013 13:45";
TaskId = 2;
description = "Task 2";
}
);
Tomorrow = (
{
AlertTime = 2;
DateFormatWithAMPM = "11-17-2013 01:45 PM";
DateOfTask = Tomorrow;
FolderId = 2;
FolderName = Routine;
FolderStatus = 0;
Notes = "Notes 1 of 1";
Status = 1;
TaskDate = "2013-11-17 13:45:44";
TaskDateFormatted = "11-17-2013 13:45";
TaskId = 1;
description = "Task 1 of 1";
}
);
}
但是当tableview加载时,它首先显示“明天”部分,最后显示“今天”部分。