-1

I created Xib file for my uitableviewcell in the attributed inspector i choose SelectionStyle default, but it didn't help me. So and i added accessory type .detailDisclosureButton. So when i tapped on a cell , My cell doesn't highlighted gray color, only disclosurebutton does

enter image description here

enter image description here

1 Answers1

0

Maybe you can try this one,

extension CWScoreBoardViewController: UITableViewDelegate {

  func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      tableView.deselectRow(at: indexPath, animated: true)
  }

}

or you can try this,

extension CWScoreBoardViewController: UITableViewDataSource {

  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "CWUsersTableViewCell", for: indexPath) as! CWUsersTableViewCell

      cell.selectionStyle = .none

      return cell
  }

}

Baran Gungor
  • 176
  • 8