NSObject에 저장된 배열의 데이터를 표시하는 tableview가 있습니다. NSObject의 속성 중 하나는 inputtime (currentCall.inputtime)이며이를 기반으로 표시된 데이터를 정렬하려고합니다. 이 일을 어떻게 하죠? 감사. 당신은 당신의 데이터가 먼저 MODELL 정렬이데이터를 기반으로 정렬 정렬
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
JointCAD *currentCall = [[xmlParser calls] objectAtIndex:indexPath.row];
static NSString *cellidentifier1 = @"cell1";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellidentifier1];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellidentifier1];
}
cell.textLabel.text = currentCall.currentCallType;
cell.detailTextLabel.text = currentCall.location;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
데이터가 배열에서 이전에 파싱 되었습니까? 모두 내가하고 싶은 일은 currentCall.inputtime을 기반으로 xmlParser.calls 배열을 정렬하는 것입니다. –
[xmlParser calls]는 배열이며, 구문 분석을하지 않습니다. –
귀하의 의견에 따라 업데이트되었습니다. – AlexWien