我有6段在一个UITableView,每一部分显示2个格,通常情况下,我希望它是这样的: 重复的元素
然而,这里是我有:
每个indexPath.row都在每个部分中重复。 下面是代码:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"avenir";
Avenir *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(!cell) {
cell =[[Avenir alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.equipea.text=[arrayofClubA objectAtIndex:indexPath.section];
cell.equipeb.text=[arrayofClubB objectAtIndex:indexPath.section ];
return cell;
}
的元件被从两个NSMutableArrays,一个用于在小区中的第一左侧元件和另一个用于右元素细胞检索。 有什么不对?
谢谢你的帮助。
+1包括你的猫的图画屏幕截图 – matt 2013-05-07 18:03:08
@matt:LOL!你明白我的问题的重要之处在于:D。 – androniennn 2013-05-07 19:11:32