사용자 지정 셀 두 개를 가져 와서 첫 번째 행과 n-1 셀에 대해 다른 식별자 .one을 제공하십시오.
그 전에
한 임시 배열을 같이 부하 cellForRowATIndexPath
NSArray *arr=[[NSArra alloc]initWithObjects:@"FirstIdentifer",@"SecondIdientfier"];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *CellIdentifier = [self.menuItems objectAtIndex:indexPath.row];
if ([CellIdentifier isEqualToString:@"FirstIdentifer"]) {
Mycell *cell = (Mycell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"TempCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
//do your stuff
return cell;
}
else
{
static NSString *simpleTableIdentifier = @"SecondIdientfier";
cell1 = (Mycell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"Mycell" owner:self options:nil];
cell1 = [nib objectAtIndex:0];
//do your stuff
return cell1;
}
}