두 셀에 대해 서로 다른 NIB가있는 경우 :
static NSString * simpleTableIdentifier = @ "SimpleTableCell";
SimpleTableCell *cell = (SimpleTableCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil)
{
switch (indexPath.section) {
case DetailControllerAddressSection:
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"SimpleTableCell1" owner:self options:nil];
cell1 = [nib objectAtIndex:0];
// write here cell1 specific
cell=cell1;
break;
case anotherCase:
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"SimpleTableCell2" owner:self options:nil];
cell2 = [nib objectAtIndex:0];
// write here cell2 specific
cell=cell2;
}
}
return cell;