Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Accessibility hide the "textField, double tap to edit" announcement

I have a textField with a pickerView as the inputView.

Now when I have the voiceover on and select the textField, the voiceover will read this: "Quantity: 3 (content of the textField)", then "textField", then "Double tap to edit".

Is there anyway to make the voiceover just reads the content and skip the following "textField. Double tap to edit"?

I have tried to give the textField another UIAccessibilityTraits/Hints and they are not working.

Thanks!

like image 940
Ke MA Avatar asked Mar 10 '16 21:03

Ke MA


1 Answers

Assuming your text field is a subclass of UITextField, you're looking for the static text trait.

UITextField* aTextField = .....
aTextField.accessibilityTraits |= UIAccessibilityTraitStaticText;
like image 182
ChrisCM Avatar answered Sep 19 '22 02:09

ChrisCM