如何[UIFont familyNames]按字母顺序对填充的数组进行排序?
我需要在UITableView中显示由API返回的NSDictionary的内容,尊重键的顺序.
我正在使用 :
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *key = self.data.allKeys[indexPath.section];
NSArray *list = self.data[key];
id data = list[indexPath.row];
PSSearchCell *cell = [PSSearchCell newCellOrReuse:tableView];
cell.model = data;
return cell;
}
Run Code Online (Sandbox Code Playgroud)
但就像我一样self.data.allKeys,我正在失去我的钥匙的顺序.我无法按价值对它们进行排序,因为它与它们无关.