title: how to tap in content view in didselectrow method in tableview in swift
body: <p>I am new in ios I am making a project using table view in which I have expanded the table view cell which has 4 Content view.When the table is loaded only first content view show and when I select the row then all content view expands. But I also want that after expanding the all content view cell when I tap on fourth content view then I want to access the indexPath.row in the tapGESTUREAction method of the fourth view.
      this my code of expanding Cell which consists of 4 content view
        func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
                    print(YearArr.count)
              return YearArr.count;
          }</p>
  
  <pre><code>    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cellIdentifier = "Cell"
          let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) as! customCell
          cell.selectionStyle = .none
               cell.lblGrossSal.text = EarnArr[indexPath.row]
  
           cell.lblTotlSal.text = netPayArr[indexPath.row]
           cell.lblmonthhName.text = YearArr[indexPath.row]
              print(selectedIndex,indexPath.row)
          let height = cell.bounds.height
          print(height)
         return cell;
      }
  
         func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat {
          let cellIdentifier = "Cell"
          let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) as! customCell
          cell.selectionStyle = .none
  
          if(selectedIndex == indexPath.row) {
  
                         return 190;
              return self.calculateHeight(selectedIndexPath: indexPath)
          } else {
  
                          return 50;
          }
             }
   // fourthView
      func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  
          if(selectedIndex == indexPath.row) {
              selectedIndex = -1
                     } else {
              selectedIndex = indexPath.row
  
          }
          self.expandTableView.beginUpdates()
          //self.expandTableView.reloadRows(at: [indexPath], with: UITableViewRowAnimation.automatic )
          self.expandTableView.endUpdates()
  
  
         }
      func calculateHeight(selectedIndexPath: IndexPath) -&gt; CGFloat {
          let cell = self.expandTableView.cellForRow(at: selectedIndexPath) as! customCell
          cell.lblDeductSal.frame = self.cellSummaryLabelFrame(cell: cell, selectedIndexPath: selectedIndexPath)
  
          return 80 + 35 + 21 + 10 + cell.lblDeductSal.frame.size.height + 30
      }
  
      func cellSummaryLabelFrame(cell: customCell, selectedIndexPath: IndexPath) -&gt; CGRect {
          print(DeductionArr[selectedIndexPath.row])
          cell.lblDeductSal.text = DeductionArr[selectedIndexPath.row]
          cell.lblDeductSal.numberOfLines = 0
          var labelFrame = cell.lblDeductSal.frame
          let maxSize = CGSize.init(width: cell.lblDeductSal.frame.size.width, height: CGFloat.greatestFiniteMagnitude)
          let requiredSize = cell.lblDeductSal.sizeThatFits(maxSize)
          labelFrame.size.height = requiredSize.height
          return labelFrame
      }
  </code></pre>