int i = 0;
NSMutableArray *array = [[NSMutableArray alloc] init];
for (MySelfPayPackageModel *model in self.dataSource) {
if (model.handsel!=0) {
i++;
[array addObject:model]; // 获取需要顶置的元素
}
}
[self.dataSource removeObjectsInArray:array];// 在原数组移除需要顶置的元素
NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, array.count)];
[self.dataSource insertObjects:array atIndexes:indexSet];// 在原数组移除加入顶置的元素