I have a storyboard containing a UITableViewController
with static content. The cells are very simple, containing just a single UILabel
. If I now want to disable accessibility on one of the cells, I simply uncheck the mark on the label. This works as expected.
However if I now create an empty subclass of UITableViewCell
and use this as the cell class for my static cell, accessibility will be enabled, ignoring all settings.
I tried overriding -isAccessibilityElement
to return NO
, programmatically setting all child views accessibilityElement
property to NO
, but it still will be selectable when using VoiceOver. The content won't be read by VoiceOver, only a single " " seems to be there (can be heard when swiping up/down on this element).
What do I need to do to disable accessibility for my custom cell?
Maybe, this way is easier.
cell.textLabel.accessibilityElementsHidden = YES;
Look this post
;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With