iOS 排序时间

iOS 按时间的近期优先

NSSortDescriptor *sorter = [[NSSortDescriptor alloc] initWithKey:@"time"ascending:YES];

NSMutableArray *sortDescriptors = [[NSMutableArray alloc] initWithObjects:&sorter count:1];

NSArray *sortArray = [_dataArray sortedArrayUsingDescriptors:sortDescriptors];

你可能感兴趣的:(iOS 排序时间)