Reputation: 1113
I want to make a textfield and a subview on the text field accessible by VoiceOver. If I use UIAccessibilityContainer
methods, I can only make the subviews accessible. Is there some way to do this?
Upvotes: 8
Views: 3916
Reputation: 955
try this,
textfield.isAccessibilityElement = YES;
textfield.accessibilityElementsHidden = NO;
Leave the container methods for time being.
Upvotes: -1
Reputation: 20609
No. You must go up one level in the accessibility hierarchy. Implement the container protocol on your view's superview and return all of its descendants as children (and, thus, siblings of each other).
Upvotes: 5