user1046037 user1046037 - 1 year ago 142
iOS Question

Prevent voice over (Accessibility) from announcing UITableViewCell as selected

When a UITableViewCell is selected, voice over announces "selected", I don't want voice over to say "selected". How can i achieve this ?

Things I have tried with no success:

  • Changed the cell

  • Changed the cell
    selectionStyle = UITableViewCellSelectionStyleNone

  • changed the cell
    accessibilityTraits = UIAccessibilityTraitButton


  • I don't want voice over to say "selected" when a cell is selected. How can i achieve this ?

Answer Source

The only work around is prevent cell selection

- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath;
    return nil;

Add a Tap gesture on the cell and when the cell is tapped, do the what ever you want in cell selection inside the tap gesture.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download