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
Asked
Active
Viewed 175 times
-1
-
1can you show your code or attributed inspector details – Anbu.Karthik May 29 '20 at 05:41
-
I added screenshot of my attributed inspector – Аба-Бакри Ибрагимов May 29 '20 at 06:07
-
try this : https://stackoverflow.com/questions/28833609/custom-ui-tableviewcell-selected-backgroundcolor-swift/41708160 – Anbu.Karthik May 29 '20 at 06:09
1 Answers
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