iOS Keyboard, VoiceOver and accessibilityViewIsModal

Viewed 1038

I'm trying to make a inputAccessoryView AND the keyboard modal for VoiceOver users so they don't get lost. Setting:

view.accessibilityViewIsModal = YES;
textField.inputAccessoryView = view;

Makes the view modal with keyboard visible but unusable - it is outside of the modal view.

Next I tried this after the keyboard has appeared:

textField.inputAccessoryView.superview.accessibilityViewIsModal = YES;

Which seems a bit out of bounds but almost worked - but the keys physical after B (N, M space, etc) were not navigable.

Next up was this:

textField.inputAccessoryView.superview.superview.accessibilityViewIsModal = YES;

and everything works just fine. That view, BTW logs as follows:

<UITextEffectsWindow: 0x17170290; frame = (0 0; 320 568); opaque = NO; gestureRecognizers = <NSArray: 0x17170710>; layer = <UIWindowLayer: 0x17170430>>

My question is this: I this a stupid thing to do? Seems like it. Is it legal? UITextEffectsWindow is private, but I'm not actually using it, just taking advantage of the fact that it's a view.

Any input or ways to work around the problem would help.

1 Answers
Related