【发布时间】:2014-04-22 20:03:52
【问题描述】:
- (NSArray *)combinedStrings {
return [[self.numberOfUsers arrayByAddingObjectsFromArray:self.numberOfModerators] arrayByAddingObjectsFromArray:self.numberOfAdmins];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *jsonForJam = [self.combinedStrings objectAtIndex:indexPath.row];
return cell;
}
我想对tableView中显示的结果进行降序排序,怎么办?
我已经尝试过使用它,但没有帮助:Best way to sort an NSArray of NSDictionary objects?
基于我提供的示例代码的解决方案将非常有帮助。
【问题讨论】:
-
您已就该主题提出的前两个问题的答案有什么问题?
-
@rmaddy 这对我有用,但我也被困在这部分。
-
“这是一个表格视图”是什么意思?您不是在尝试对 UITableView 进行排序,而是在尝试对 NSArray 进行排序。重复的大卫指出你做同样的事情:排序一个 NSArray。
标签: ios objective-c uitableview sorting