2014-12-03 58 views
1

当选择UITableViewCell时,语音播报宣布“选择”,我不希望语​​音说“选择”。我怎样才能做到这一点?防止语音通过(辅助功能)从宣布UITableViewCell选择

事情我已经尝试没有成功:

  • 改变了细胞accessibilityHintaccessibilityLabel
  • 改变了细胞selectionStyle = UITableViewCellSelectionStyleNone
  • 改变细胞accessibilityTraits = UIAccessibilityTraitButton

问题:

  • 我不想在选定单元格时选择“选择”。我怎样才能做到这一点?
+0

防止语音手段? – sanjeet 2014-12-03 12:12:12

+0

当我选择一个单元格时,我不想让语音说“选中” – user1046037 2014-12-03 12:12:58

回答

0

唯一的解决办法是防止细胞选择

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

添加敲击手势的细胞,当细胞被窃听,你在敲击手势内的小区选择想要的什么都。

0

你可以通过再次取消细胞尝试:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
[tableView deselectRowAtIndexPath:indexPath animated:YES]; 
} 
0

您可以创建自定义单元格类和重写accessibilityTraits这样的:

- (UIAccessibilityTraits)accessibilityTraits { 
    return UIAccessibilityTraitButton; 
}