title: Swift: TableView didSelectRowAt Only Firing For Certain Rows?
body: <p>I am currently adding functionality to my Settings table view, and for some reason the table view didSelectRowAt function is only firing when I select the first row in each section.</p>
  <p>I set up the table view using enum but I do not see why that would be causing the issue.</p>
  <p>Here is my didSelectRowAtFunction:</p>
  <pre><code>    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
          guard let section = SettingsSections(rawValue: indexPath.section) else { return }
          guard let accountSection = AccountOptions(rawValue: indexPath.row) else { return }
          guard let financialSection = PaymentOptions(rawValue: indexPath.row) else { return }
          guard let communicationsSection = CommunicationsOptions(rawValue: indexPath.row) else { return }
          switch section {
          case .Account:
              switch accountSection {
                  case .editAccountInfor:
                      print(&quot;Edit account pressed&quot;)
                  case .logout:
                      print(&quot;logout pressed&quot;)
              }
          case .Communications:
              switch communicationsSection {
                  case .notifacations:
                      print(&quot;notifs pressed&quot;)
              }
          case .Financial:
              switch financialSection {
                  case .linkBankAccount:
                      print(&quot;LBA pressed&quot;)
                  case .viewPaymentOptions:
                      print(&quot;payment options pressed&quot;)
              }
          }
      }
  </code></pre>
  <p>And it fires completely fine when I press the edit account information row, link bank account row or the notifications row. But when I press any of the rows that are not the first in the section, it does not display any statements.</p>
  <p>Just in case it becomes necessary, here is my SettingsSections code along with AccountOptions to allow you guys to see how I have things set up.</p>
  <pre><code>enum SettingsSections: Int, CaseIterable, SectionType {
      case Account
      case Financial
      case Communications
  
      var containsSwitch: Bool {
          return false
      }
      
      var description: String {
          switch self {
          case .Account: return &quot;Account&quot;
          case .Financial: return &quot;Financial&quot;
          case .Communications: return &quot;Communications&quot;
          }
      }
  }
  
  enum AccountOptions: Int, CaseIterable, SectionType {
      case editAccountInfor
      case logout
      
      var containsSwitch: Bool {
          return false
      }
      var description: String {
          switch self {
          case .editAccountInfor: return &quot;Edit Account Information&quot;
          case .logout: return &quot;Log Out&quot;
          }
      }
  }
  </code></pre>