Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 VoiceOver 可访问的文本字段上创建一个文本字段和一个子视图。如果我使用 UIAccessibilityContainer 方法,我只能使子视图可访问。有没有办法做到这一点?
没有。您必须在可访问性层次结构中上一层。在视图的父视图上实现容器协议,并将其所有后代作为子视图(因此,彼此的兄弟姐妹)返回。
尝试这个,
textfield.isAccessibilityElement = 是;
textfield.accessibilityElementsHidden = 否;
暂时离开容器方法。