我使用NSSortDescriptor对存储在NSArray中的值进行降序排序,排序后的值显示在控制台中。
但是,在重载表视图时,zhr排序的表数据不会排序。
下面是我的代码:
NSArray *descriptor = [NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"Priority" ascending:NO]];
self.searchResult = [self.responseData sortedArrayUsingDescriptors:descriptor];
NSLog(@"Sorted Array %@", self.searchResult);https://stackoverflow.com/questions/44493063
复制相似问题