iOS:是否有一种方法可以用自定义元素替换默认的可访问性/双击元素上的语音操作? [英] iOS: Is there a way to replace the default accessibility / voice over double tap action on an element with a custom one?

查看:45
本文介绍了iOS:是否有一种方法可以用自定义元素替换默认的可访问性/双击元素上的语音操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以通过将自定义辅助功能添加到相应视图的accessibilityCustomActions数组中来添加.

I know that it is possible to add custom accessibility actions by adding them to the accessibilityCustomActions array of the corresponding view.

但是,这不能代替您在点击语音时执行的标准操作(您必须先滑动才能选择自定义操作).我想替换默认的轻击动作或拦截轻击事件...有没有办法做到这一点?

But that does not replace the standard action that is performed when you do a voice over tap (you will have to swipe first to select the custom action). I would like to replace the default tap action or intercept the tap event ... is there a way to do that?

推荐答案

绝对!覆盖 bool accessibilityActivate() 来实施自定义默认操作.

Absolutely! Override bool accessibilityActivate() to implement a custom default action.

这篇关于iOS:是否有一种方法可以用自定义元素替换默认的可访问性/双击元素上的语音操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆