iOS 排序

按時間升序排列:
例:1月1日 12:30
1月1日 14:30
1月2日 10:30

NSSortDescriptor*sorter=[[NSSortDescriptor alloc]initWithKey:@“start_time” ascending:YES];
NSMutableArray *sortDescriptors=[[NSMutableArray alloc]initWithObjects:&sorter count:1];
NSArray *sortArray=[tableData sortedArrayUsingDescriptors:sortDescriptors];

發佈了32 篇原創文章 · 獲贊 4 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章