iTranslated by AI
The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
✨
How to disable cell highlighting on tap
By default, tapping a cell causes it to highlight, but this feature may be unnecessary for cells that don't need to transition to another screen.

While you could set isUserInteractionEnabled to false, that would also disable buttons within the cell.
Starting from iOS 15, a new feature called configurationUpdateHandler was introduced. This is called whenever the cell's state changes.
By writing the code as follows, you can keep the cell's selection style set to .none at all times.
cell.configurationUpdateHandler = { (cell, state) in
cell.selectionStyle = .none
}
Discussion