I am creating accordion tableview cell using iOS storyboard. Here I have maintaining two tableview custom cell classes and cells on single storyboard within single tableview.
Now my problem is after selected the row based on plist storage It will expand (adding) additional rows at under the selected two. I need to use separate tableview cell for selected tableview cell (parent cell) and expandable cell (child cell). By my below code parent and child cell are showing and referring same cells(thats is parent only. So I cant differentiate UI for parent and child.
Need to modify below my logic.
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *dic=[self.itemsInTable objectAtIndex:indexPath.row];
if([dic valueForKey:@"SubItems"])
{
NSArray *arr=[dic valueForKey:@"SubItems"];
BOOL isTableExpanded=NO;
for(NSDictionary *subitems in arr )
{
NSInteger index=[self.itemsInTable indexOfObjectIdenticalTo:subitems];
isTableExpanded=(index>0 && index!=NSIntegerMax);
if(isTableExpanded) break;
}
if(isTableExpanded)
{
[self CollapseRows:arr];
}
else
{
// NEED TO ADD SECOND CELL HERE
NSUInteger count=indexPath.row+1;
NSMutableArray *arrCells=[NSMutableArray array];
for(NSDictionary *dInner in arr)
{
[arrCells addObject:[NSIndexPath indexPathForRow:count inSection:0]];
[self.itemsInTable insertObject:dInner atIndex:count++];
}
[self.main_tableview insertRowsAtIndexPaths:arrCells withRowAnimation:UITableViewRowAnimationNone];
}
}
}

[CellIdentifier_one isEqualToString:@"Cell_One"]is always equal toYES?