switch control selection disable for UITableViewCell

If I turn on accessibility setting switch control the switch control is also selecting UITableViewCells, which has no actions (isUserInteractionEnabled = false, selectionStyle = .none). I can't find any approach to disable this behavior. Is there any way to disable this selection for some cells?

Replies

Did you initialize the isAccessibilityElement property to false ?


collectionView.isAccessibilityElement = false


I found this interesting:

h ttps://medium.com/@mecid/make-your-app-accessible-for-everyone-a3f8dc178a2c

I did try cell.isAccessibilityElement = false, cell.contentView.isAccessibilityElement = false and tableView.isAccessibilityElement = false, but nothing worked.

What objects inside the tableViewCell ?

Only UILabel.