数组排序

1.根据数组中某个字段

NSSortDescriptor *des=[NSSortDescriptor sortDescriptorWithKey:@"createTime" ascending:NO];

self.arr = [NSMutableArray arrayWithArray:[self.arr sortedArrayUsingDescriptors:[NSArray arrayWithObjects:des, nil]]];

你可能感兴趣的:(数组排序)