新的目标。我正在尝试将 2 个值放入表视图中。这是代码的一部分:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.font = [UIFont systemFontOfSize:14]; //Change this value to adjust size
cell.textLabel.numberOfLines = 2;
NSString *desc= @"Alight Destination =";
cell.textLabel.text = desc,[alDescArray objectAtIndex:indexPath.row];
return cell;
}
对于这一行cell.textLabel.text = desc,[alDescArray objectAtIndex:indexPath.row];
,表格只显示Alight Destination =
而不添加[alDescArray objectAtIndex:indexPath.row];
我做错了什么部分请帮忙