新的客观。我正在试图将2个值放入表格视图中。这是部分代码:如何将2个对象添加到tableview单元格
- (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];
该表只不中的值增加对[alDescArray objectAtIndex:indexPath.row];
显示Alight Destination =
哪部分我做错误请帮助
你的标题应该是“我如何连接字符串”。可能重复http://stackoverflow.com/questions/510269/how-do-i-concatenate-strings-in-objective-c – 2012-08-10 06:22:25