title: What to write to activate an action under didSelectRowAt if the cell is in Section: 5 Row: 0
body: <p>I know "if indexPath.section == x or if indexPath.row == x { " to activate the button in particular row.</p>
  
  <p>If my cell is at section 5 row 0, what is the proper way to write to activate the action in that cell?</p>
  
  <p>Edit (more info more code)</p>
  
  <pre><code>override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath)
      let name = twoDimensionalArray[indexPath.section][indexPath.row]
  
      cell.textLabel?.text = name
      cell.textLabel?.text = "\(name)   Section:\(indexPath.section) Row:\(indexPath.row)"
      cell.accessoryType = .disclosureIndicator
  
      return cell
  }
  </code></pre>
  
  <p>cause I used disclosureIndicator I could see section # &amp; row # of all my TableCells.</p>
  
  <p>My section 5 has only one row which is "Sign Out" so I had:</p>
  
  <pre><code>override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      tableView.deselectRow(at: indexPath, animated: true)
      if indexPath.section == 5 {
          let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
          alertController.addAction(UIAlertAction(title: "Log Out", style: .destructive, handler: { (_) in
              do {
                 //... ...//
          }))
          alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
          present(alertController, animated: true, completion: nil)
      }
  }
  </code></pre>
  
  <p>However, my other sections have multiple rows. Thus, what should I write if I want to perform an action in Section 4 Row 2?</p>