ECSlidingViewController2 - hidden menu tappable with VoiceOver on

63 Views Asked by At

When using ECSlidingViewController2, How can we prevent the under left menu from being tapped with VoiceOver on and the menu is under the top view? Try the BasicMenu example. When on the Home view, you can tap the options on the menu underneath.

1

There are 1 best solutions below

1
On

If you dont want the voice over to read it, then make it inaccessible. Set the isAccessibleElement to NO.

This is a master switch for whether the element is accessible or not. UIViews and any custom direct subclasses of it are not accessible by default, whereas UIControls are. Elements which are not marked as accessible will be ignored by VoiceOver, and will be skipped when the user is navigating between accessible elements.

- (BOOL)isAccessibilityElement {
//if this is YES, VoiceOver won't continue to look for accessibility elements in this view's subviews
return NO;
}

Also you can set this to any UIView in your app.