title: Get the UITableViewCell indexPath using custom cells
body: <p>I have a view which contain a UITableView. The cells of this UITableView are created in Interface Builder, in order to have different kinds of cells. So the action of each button is managed in the cell classes like following.</p>
  
  <p><strong>- My UITableView containing different kinds of cells :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/PBe6d.png" alt="enter image description here"></p>
  
  <p><strong>- The header file of my class for <em>type one</em> cells <em>("CellTypeOne.h")</em> :</strong></p>
  
  <pre><code>@interface CellTypeOne : UITableViewCell
  {
  }
  
  - (IBAction)actionForFirstButton:(id)sender;
  - (IBAction)actionForSecondButton:(id)sender;
  - (IBAction)actionForThirdButton:(id)sender;
  - (IBAction)actionForFourthButton:(id)sender;
  </code></pre>
  
  <p><strong>- The header file of my class for <em>type two</em> cells <em>("CellTypeTwo.h")</em> :</strong></p>
  
  <pre><code>@interface CellTypeTwo : UITableViewCell
  {
  }
  
  - (IBAction)actionForTheUniqueButton:(id)sender;
  </code></pre>
  
  <p><strong>- The view which contain my table view (<em>"ViewContainingMyTableView.h"</em>) :</strong></p>
  
  <pre><code>@interface ViewContainingMyTableView : UIViewController &lt;UITableViewDelegate, UITableViewDataSource&gt;
  {
      UITableView *myTBV;
  }
  
  @property (retain, nonatomic) IBOutlet UITableView *myTBV;
  
  @end
  </code></pre>
  
  <p><strong>Here the thing I want to do :</strong></p>
  
  <p>When I click on the first button in the first cell, for example, I want to be able to show the indexPath of the <em>"current"</em> cell.</p>
  
  <p><strong>For example</strong>, I want to have the following output when :</p>
  
  <ul>
  <li>I click on the first button in the first cell : <code>0</code></li>
  <li>I click on the third button in the first cell : <code>0</code></li>
  <li>I click on the first and unique button in the second cell : <code>1</code></li>
  <li>etc...</li>
  </ul>