title: How to get IndexPath first section tableview of subcell using Objective C?
body: <p>I am trying to create accordion <code>tableview</code>. here I can get easily <code>parent tableview</code> selected cell index path values but I cant get subtable (Expandable <code>child</code> tableview cell) <code>row index path</code>. Please give me any solution for my issue and find below code </p>
  
  <p>My Code :</p>
  
  <pre><code>// @optional
  - (void)didSelectRowAtChildIndex:(NSInteger)childIndex underParentIndex:(NSInteger)parentIndex {
  
      NSIndexPath * indexPath = [NSIndexPath indexPathForRow:[self rowForParentIndex:parentIndex] inSection:0];
      UITableViewCell *selectedCell = [self cellForRowAtIndexPath:indexPath];
  
      if ([selectedCell isKindOfClass:[ParentTableViewCell class]]) {
  
          //ParentTableViewCell * pCell = (ParentTableViewCell *)selectedCell;
  
          // Insert code here to detect and handle child cell selection
          // ...
  
      }
  }
  </code></pre>
  
  <p>I am checking by open source code : <a href="https://github.com/ajkoshy7/SubTable" rel="nofollow">https://github.com/ajkoshy7/SubTable</a></p>