我有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